mmgeorge / sly-asdf

ASDF contrib for SLY
GNU General Public License v3.0
23 stars 11 forks source link

Don't force-compile systems #33

Open Ambrevar opened 3 years ago

Ambrevar commented 3 years ago

When systems are installed in a read-only location (like in Guix and maybe in Nix), sly-asdf-load-system and sly-asdf-reload-system will fail, complaining they cannot write the .fasl.

I suggest disabling :force t by default, only forcing the build if, say, the prefix argument is used.

mmgeorge commented 3 years ago

Hmm, I don't quite remember why I changed the default for load-system to :force for this, looking at the doc for ASDF:

The :FORCE or :FORCE-NOT argument to OPERATE can be: T to force the inside of the specified system to be rebuilt (resp. not), without recursively forcing the other systems we depend on. :ALL to force all systems including other systems we depend on to be rebuilt (resp. not). (SYSTEM1 SYSTEM2 ... SYSTEMN) to force systems named in a given list :FORCE-NOT has precedence over :FORCE; builtin systems cannot be forced.

Assumed this meant that the current system would always be fully rebuilt which seems like what someone would typically expect (vs reload).

Basically you can't reproduce this if you call asdf:operate directly without the :force t? I can change the default back, but I don't think reload-system should be using :force t at all, so I'm confused on why you are seeing the same behavior there.

Ambrevar commented 3 years ago

Matt George notifications@github.com writes:

Basically you can't reproduce this if you call asdf:operate directly without the :force t?

Indeed.

I can change the default back, but I don't think reload-system should be using :force t at all, so I'm confused on why you are seeing the same behavior there.

I see this problem with reload-system as well, but looking at the code I don't understand why.