-
Notifications
You must be signed in to change notification settings - Fork 3
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
Inconsistent intermediate state when sequencing gazelle_cabal and gazelle_haskell_modules #40
Comments
I see 3 options:
|
While we don't have a concrete usability concern to address, this looks attractive if other fixes are laborious.
... and keep the
Maybe this is possible, and perhaps it would be the ideal solution. At some point I thought that dependencies between gazelle phases would make it difficult, but I don't have clarity about this anymore. If anything, it is worth writing down what are the difficulties of running them in a single binary. |
After a discussion with Arnaud about the fact that solving this issue takes too much time, we agreed that I should make very regular comments on what has been achieved / has been understood / remain to do. |
The current status (e02fbbc) is that the file generated on the test is
It is almost what is expected, but the dependencies of |
As far as I understand, it is not possible to add those
|
The previous version was working, but a few |
Let me see if I understand.
But what would happen if we tried to combine the callbacks of both extensions in a single gazelle run? Presumably calls would happen roughly in the following order:
This is a conjecture, I don't really know how it works, but I think we should find it out ahead of discussing a solution. |
This would be what I expected too. But when adding a simple print in the relevant functions of the extensions, the result is:
No |
Given the limitations of
? [1]: The complexities I understand are:
|
I agree with your diagnosis of the complexity. It is the diagnosis (and the overcoming) of those complexity which made this issue quite long to solve. About what should we do now, that is a great question. I think that the first question to ask is "Do we expect to have users of Otherwise, it is more debatable question. |
When a project uses
gazelle_cabal
andgazelle_haskell_modules
, adding Haskell files requires to modify thexxx.cabal
file, hence to rungazelle_cabal
to propagate those modifications to Bazel. But runninggazelle_cabal
alone on a "haskell_modules" Bazel project leads to an inconsistent state where thehaskell_library
rules have both thesrcs
and themodules
fields, whereas the 2 are incompatible.Fortunately, running
gazelle_haskell_modules
solves this and bring the project in the expected state.The text was updated successfully, but these errors were encountered: