Reflex Tutorial Upgrade
In the Reflex Package Versions blog entry, I tried to manually upgrade the Reflex FRP calculator tutorial to use the latest release of Obelisk. Building the project failed with an unknown error, and I was unable to build verbosely due to a bug. A friend emailed me with some tips, and this blog entry documents my continued efforts to upgrade the tutorial.
When I tried upgrading the tutorial to use the latest version of
Obelisk, I saw that the .obelisk/impl
directory is itself a
“thunk.” My friend pointed out that the usual way to “update” this is to
use an ob thunk update
command. He suggested using the
following command.
$ ob --no-handoff thunk update .obelisk/impl --branch master
I have not used the --no-handoff
option yet, so I looked
it up. It is documented as follows.
$ ob --help
...
--no-handoff Do not hand off execution to project-specific
implementation of this command
...
When I am in a project directory and run ob
(without
using --no-handoff
), the command builds the ob
command using the project configuration (which may be cached) and runs
it. That is the behavior that I have been seeing. With
--no-handoff
, the ob
command in my environment
(Nix profile) is used instead.
I ran the above thunk update command and confirmed that it updates
the Obelisk thunk to use the latest revision on the master
branch. It of course does not change any of the other files that I
manually merged from the new project template.
With the Obelisk configuration updated, it was time to execute
ob run
. My friend indicated that it should take about
thirty minutes in this case. I executed ob run
, and it took
almost exactly one hour to fail with the same error message that I saw
before. Regarding timing, it is feasible that my friend’s workstation is
more than twice as fast as my laptop.
My friend also said that the reflex-dom-core
error that I mentioned in the Nix Reproducibility blog
entry should not occur if the cache is used! Since I am unable to use
--verbose
, I cannot see what the actual error is that is
causing my tutorial builds to fail. Perhaps the cache is not being used,
and perhaps I would not get the error if cache is used? It is a shot in
the dark.
According to the Installing
Obelisk instructions, the cache is configured on non-NixOS system in
the /etc/nix/nix.conf
configuration file. (Note that the
“see full list” link outdated; the Nix manual is now spread out across
many pages instead of all on a single page.) Is this configuration file
used by single-user Nix installs? I have not been able to find a
definitive answer to this. There is no indication that it is not used,
and I have not been able to find any documentation about configuring
single-user installs in particular. Discussion about this configuration
file indicates that there is no default
/etc/nix/nix.conf
when doing a single-user install, but
that it should be created manually, which is what I did.
Perhaps I should try a multi-user installation to see if that changes anything. In January, I aborted my attempt to use a multi-user installation after getting permissions errors (see Uninstalling Multi-User Nix). Perhaps those issues were due to my Arch Linux host, and using a more “enterprise” distribution like Ubuntu would allow me to avoid them. If I need to configure a system with a different OS, however, I may as well use NixOS…