-
Notifications
You must be signed in to change notification settings - Fork 701
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
Expose cabal.project
in library component?
#6090
Comments
Note: since I'm not saying that there couldn't be some small specific independent library, but that library ought to have well-designed API (i.e. not everything |
This has been discussed previously, see #5476. I think that perfect is the enemy of good enough here, so personally am +1 on following the GHC API approach and exposing the existing internals with no guarantees of stability between major releases. Though I'd like to do this in gradual fashion and expose the solver lib first. |
The #5476 already mentioned the fact which is worth repeating: If we don't care about minor releases breaking stuff, than having a public library is ok. But in that case An alternative is to be very strict of which patches to let in / backport. E.g. http://hdiff.luite.com/cgit/cabal-install/diff?id=2.4.1.0&id2=2.4.0.0 has a breaking API change right at the top of the diff. |
Right. I think that we can live with the latter if major |
If for one strongly care about this; and this would effectively mean that we won't be able to fix some things within a patch-level or minor-release, except with high costs, due to the hard requirement to not break the API contract; and fixes might be delayed by ~6 months because of this. Are we sure we want to incur that cost? |
@hvr, I don't think having a major release of E.g.
So I actually don't care whether |
On a related note, we should start date-versioning WIP |
@phadej> But in that case cabal-install would be a PITA library to depend upon. It isn't already? Almost every piece of code that I have that depends on |
We can do that at some additional cost (note that we currently rely on the versions being synced to simplify some of the codepaths -- those will become harder to maintain when this symmetric simplificiation doesn't hold anymore); and it's just kinda ironic since we intentionally made lib:Cabal and exe:cabal sync up their major versions starting with cabal-install-1.16, and now you've basically saying that it was pointless to do so in the first place... |
I'm implemented this in #7358 after considering this discussion. The PR deals with a few knock-on effects of the decision to not expose the
The calculus is pretty clear. I'll be merging it asap. |
@emilypi are you including |
@phadej no, I'm considering just |
Would it be possible to expose
cabal.project
data structures and parsing code in a publiccabal-install
library component?This would be helpful for
cabal-install
wrapper tools. For example, I may want to write a tool that automagically runs oneghcid
session for each component in a package (sinceghci
can only load one component at a time). Doable for single-package projects using theCabal
library, but more difficult for entire projects with multiple.cabal
files in different subdirectories.The text was updated successfully, but these errors were encountered: