Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy and addToPackageSet flags from operations #338

Merged
merged 2 commits into from
Feb 8, 2022

Conversation

thomashoneyman
Copy link
Member

As described in #332:

An Addition takes an addToPackageSet flag, and an Update does not

This is a historical accident that came from the fact that we added this flag long before we specced properly how to do package sets here. I think we could just take this flag away and always try to add packages to the set?

removing the legacy flag. We know a package is a legacy package if it doesn't have a .purs.json file

I think this is a good idea, yeah. Again the legacy flag was added when we did not know better - now we know that we can just use the Manifest existence to decide which path to take in the API

@@ -168,7 +168,7 @@ addOrUpdate { ref, legacy, packageName } metadata = do
log $ "Package extracted in " <> absoluteFolderPath

-- If this is a legacy import, then we need to construct a `Manifest` for it
when legacy do
unlessM (liftAff $ FS.exists manifestPath) do
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As described in this issue, a "legacy" package is any package without a purs.json manifest file.

@thomashoneyman thomashoneyman merged commit 7c99d89 into master Feb 8, 2022
@thomashoneyman thomashoneyman deleted the trh/remove-legacy branch February 8, 2022 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants