-
Notifications
You must be signed in to change notification settings - Fork 80
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
Determine a specific legacy date cutoff or require all packages to compile #577
Comments
I vote for Option 1. First of all, I really don't want to spend time on that, and I don't really want you to spend time on that either. I don't think it would get done in, say, a month and it's more important to get something out the door. Also I think that we're not going to care about Legacy packages in a few months, especially after the next major compiler release whenever that happens. And I'm a bit antsy about guessing compiler versions, especially if that means we'd be removing stuff based on that information. |
A few thoughts on this - the distiction of "legacy package" vs "new package" is not really about any of the above - which I consider implementation details, as it's literally about which code pipeline a package is going through - but really it is about "are we grandfathering this package in?". The above definition is important, because it denotes the scope of our actions as the Packaging Team. We are allowed to import "legacy" packages ourselves, as package authors can't retroactively change already published packages. Once an author adds a Going back to the original issue, it seems that the problem is the fact that
How does this make sense? If a package is going through the legacy importer then it cannot be I am ok with requiring all the legacy packages to build, but if we go to the effort of doing that then we should do a proper job. Having a "cutoff date" is arbitrary, and does not fix the problem either, so Something that helps identifying the compiler version is to infer it from the version of |
Yes, in registry terminology, a legacy package is one that does not have a
That's because we would very much like for all packages in the registry to compile, but when the process is not via a GitHub issue we can only guess at the correct compiler version, and we have no heuristics (yet) that let us reliably make that guess. When we go through GitHub issues it's still a legacy package, as you noted, it's just that we know what compiler version to use with the package. The legacy importer is in an odd state; it assumes that the This takes us back to the If, as @MonoidMusician suggested, we don't want to put in the work to get the whole registry to compile, then choosing a compiler version cutoff like 0.13.0 where we require it only after that version makes sense to me — but we still have to be able to reliably guess what version the package uses. |
In the registry call @f-f reminded me that the https://github.com/purescript/pursuit-backups repository includes the compiler version used to publish to Pursuit, so that may be a reliable way to determine a valid compiler version. See, for example, the very end of this JSON: https://github.com/purescript/pursuit-backups/blob/master/purescript-abc-parser/1.8.0.json |
We've had a discussion in core and I believe we have a consensus to apply a 0.13.0 cutoff. |
We have a consensus to:
|
Starting up on this one! Edit: This is a bit tricky to implement after all, as it relates to #255, so I'm back to being paused for the time being. |
@f-f @MonoidMusician
When we publish a package today, we specify whether it is a
Legacy
orCurrent
package. Thissource
is quite old, from our first cut at the importer scripts, and its scope has diminished significantly over time. Nowadays it solely controls whether to fail the publishing pipeline if a package fails to compile. Legacy packages can fail compilation and current packages cannot.Today we use
Legacy
when using the legacy importer andCurrent
when using GitHub issues or the legacy importer inupda-te-registry
mode. This is a problem because if a package fails to compile and is rejected by GitHub issues / update-registry mode, and then we run the legacy importer locally, the package will be registered despite failing to compile.I think that we should either a) change the
Legacy
vs.Current
distinction to be based on package publication date, where legacy packages are before a certain cutoff date, or b) remove theLegacy
vs.Current
distinction altogether, requiring all packages in the registry to compile (including legacy packages).My preference is to remove the distinction altogether, for the same reason why we decided to remove packages from the registry if they don't solve: you should be able to install and build any package from the registry.
Option 1: Legacy Cutoff Date
If we choose to retain the legacy vs. current distinction, then I think we should choose a specific date cutoff after which a package is not considered 'legacy.' I would say that September 1, 2022 makes sense as a cutoff, since that's when we "launched" the registry and deprecated the old package sets. If the package was tagged after this date then it's considered a current package.
We know the package publication date because it's used in the package metadata; we determine this when fetching the package source from GitHub. We may not be able to determine the publication date for non-Git packages when we support more
Location
s in the future, but for those we can just assume time of registration as the publication date.Upside: Easy to implement.
Downside: We still have special-casing for 'legacy' vs. 'current' packages in the pipeline. Legacy packages may be broken (they do not compile).
Option 2: All Packages Compile
Alternately, we can remove the legacy vs. current distinction altogether if we choose to only allow packages in the registry if they compile. We have already gone back through the registry to enforce that all packages solve; this would be upping the ante by also enforcing they compile.
This feels like the ideal solution, but it's made difficult because when we are using the legacy importer we must identify a specific compiler to use before hitting the
publish
pipeline. Identifying a compiler can be easy or difficult, depending on the circumstances.I believe these heuristics will allow us to reliably choose a compiler to use to compile packages imported from Bower & Spago:
We can then use the selected compiler version to run the publish pipeline as usual.
Upside: Every package in the registry is known to solve & compile. There is no distinction between a "legacy" and "non-legacy" package, and there is no special-cased code.
Downside: Our heuristics may be wrong and we incorrectly delete packages from the registry. More complicated to implement.
The text was updated successfully, but these errors were encountered: