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
haskell: invariant violation: no "data" output for enableSeparateDataOuput with custom outputs #35032
Comments
Yes, the generic builder assumes that and I see no reason why one might consider that a bug. If you have you no $data output, then you cannot enable enableSeparateDataOutput. What is the problem? |
bug is probably a bit strong. I think the question is whenever the caller of the function should be aware of the correlation or if enabling the flag should just add the "data" attribute to the outputs automatically. Depending on where both options are coming from it adds more coupling that necessary. #35040 proposes to add a bit more magic and append the "data" attribute automatically. |
The problem is that it's bad UX: the behavior of
Here are some suggestions:
@peti I'll be happy to submit a PR if you think one of these makes sense, or if you have other suggestions. |
I still don't understand this issue. The generic Haskell builder does not even accept any argument called |
My bad, in our code The generic build branches on So I guess the other option would be to remove the branch and disallow the use-case. Or add |
I cleaned that code up a bit in 25ee251. Apparantly, that if-then-else conditional slipped in by accident when the multi-outputs PR was merged. It would be nice to guard against an inconsistent state, i.e. by means of an |
In our case the package produces multiple binaries and it would be useful to retain the multiple outputs capability because they get used in different scenarios (multiple services, integration tests, DB migration tests, test logs). I guess we could create more derivations from this one to split the outputs manually. |
I don't know ... I didn't want to expose the You can manipulate |
Issue description
If
enableSeparateDataOutput
is enabled, and if custom outputs are specified (which do not containdata
) then the build fails.Steps to reproduce
Create a haskell package with
enableSeparateDataOutput = true;
andoutputs = ["out"]
Technical details
The generic builder assumes that
enableSeparateDataOutput == true
implies that$data
is set. This is not guaranteed in case of custom outputs.Found in current master.
The text was updated successfully, but these errors were encountered: