-
Notifications
You must be signed in to change notification settings - Fork 710
cabal init -w
/--with-compiler
pins GHC version in cabal.project
#5700
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
Comments
Commenting since I was just surprised by the fact that |
But, in that case, should |
I would not expect |
And does I see that we I do |
@Mikolaj all good questions, here is what I think.
I don't know. My assumption is that as cabal as gained ability to deal with projects,
I didn't think of interactive mode. Do prompts have a default? The question could be "do you want to use a speicfic version of ghc", default is no and that doesn't add a |
It does not. However, we're talking about different flags with intersecting names, that have different purposes:
If we support writing to |
My view is cabal init should not generate a cabal.project file. We do already have a way to generate a cabal.project.local file. It is called And we have a perfectly good meaning to passing with-compiler to cabal init -- it allows cabal init to work, as it requires (or at least used to, at the time that support for -w was added) a ghc in scope to operate. Everything at the moment appears to Work As Intended to me, and I propose closing this issue. |
I support closing the issue as well. |
That's probably I think I support the separation of concerns stance, even if the separation was just regarding files that are modified. Perhaps we could hint users that they can use Unrelated, commandline docs for
but the "check the resulting configuration works" is probably not true any more? |
Agree about not touching cabal-project, but a very least we should improve docs about, including the interesting dissection:
cause when a thing with the same "key" has so different purposes which can be still applicable somehow to other commands, it confuses users From
That is exactly the same info than |
I agree with @jneira here, and @Mikolaj it sounds like we have 2 tickets in particular that should be opened in favor of closing this issue:
My instinct tells me this is a problem with bettering our communication, not something we need to make code changes about. |
@emilypi: agreed. Volunteers to open tickets? @m-renaud, @andreabedini: is it the same for you, in your use case, whether you have If it's not the same, I think Let me copy a possible long term perspective on that from #hackage:
|
I had totally missed that My original comment came after discussing with colleagues about the difference in workflow between stack and cabal. A stack user noticed that with stack you never have to worry about the ghc version, since it's fixed at the start of the project by the choosen snapshot. As I was explaining my workflow to my colleage (ghcup + cabal configure/build -w), I noticed I could pass Now, fixing the base version doesn't help this endeavour since it only tells cabal which ghc version not to use. What I would like to have, is a version of edit hold on, on a second reading, is this a current feature or a proposed one? if it's only being proposed now I am strongly against it: why |
I was about to propose that alternative in my previous comment, and after take a look to flags handling and see |
Not going to change a flag name without trying communication first. Keep in mind that tooling depends on stable apis and this would break it. If we're just going to end up bikeshedding the flag name, we should at least do the following:
But my position is a strong "no" on bikeshedding flag names unless the actual result is a serious conflict between the flag's intent, usage, and documentation. Keep in mind - we don't need to reinvent the wheel. We need to bring Cabal up to a reasonable engineering standard, which means good communication, code hygiene, and stability. |
@emilypi I have no intention of breaking stuff. IMHO I don't even care about this flag at all. All I was doing is investigating if cabal supports specifying a compiler to use when creating a project. It does not. End of the story, and end of this ticket. There is no bug, cabal is working as intended. If anybody feels like discussing the use case I was interested we can do it in a new issue. |
PR #5658 added support for initializing a cabal project with a specific compiler, but does not pin it anywhere, you still need to run
cabal v2-configure -w compiler-v.e.r
so that other commands use the same version (and this only adds it tocabal.project.local
which isn't checked into version control systems).Related issues: #5661
The text was updated successfully, but these errors were encountered: