Metaxal / quickscript-extra

Scripts for Quickscript
MIT License
8 stars 3 forks source link

Auto-update only adds to library path #27

Open maueroats opened 2 years ago

maueroats commented 2 years ago

Upgrading Racket from 8.2 to 8.3 and then using rack pkg migrate 8.2 caused quickscript to have two libraries in the path, one for 8.2 and one for 8.3. All of the commands were doubled.

I don't know if this is avoidable, but FYI.

Metaxal commented 2 years ago

Thanks for the report!

This appears to happen because reinstalling a new version of Racket reinstalls all the user-scope packages in a different directory, which means there are actually 2 versions of quickscript-extra.

Ideally, probably, raco pkg migrate would inform the packages being migrated that they are being migrated, but that's currently not the case.

I'm not yet sure what the correct fix is, but in the meantime here are a few ways to fix this:

Metaxal commented 2 years ago

Also, installing only snapshots (and not releases) should also mitigate the problem, as snapshot user-scope packages are placed in a shared snapshot directory.

Metaxal commented 2 years ago

Related: https://racket.discourse.group/t/rationale-for-per-version-user-scope-packages/543

rfindler commented 11 months ago

I'm not sure if I'm understanding the question "Should we initialize the preference with an existing library.rktd file if one exists?" but the preferences library supports a notion of defaults and persists the preferences directly so you shouldn't need to deal (explicitly) with files.