-
Notifications
You must be signed in to change notification settings - Fork 704
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
RFC: What to do about v2-reconfigure #7405
Comments
How about the following?
Of course, deprecate gently, pointing users to the new command over many releases. Edit: and point users to |
I'm not sure about To modify your #3, a bit, a new command might be in order here. Perhaps |
Configure being overwrite by default, and not creating a build plan would
suit my workflows for it just fine. having to modify a project file
explicitly just to enable tests, change basic flags etc would be a
significant step backward in terms of usability, so I definitely want to
keep some version of the command around.
|
Re new command, fine. I see we have only one similar command
but it modifies global user configuration and we need a command for local project configuration. So perhaps
The name |
oh interesting. I didn't know that command existed! It's a shame that comamnd doesn't have a |
And can you specify the same things and in the same way in ~/.cabal/config as in cabal.project? I honestly have no clue. If yes (or if we can make it so), sounds like a great idea to extend this command (and possibly rename it, though keeping old names has its merits; the problem of v2-configure is not a bad name, but an unfortunate name clash with v1-configure). |
I vote we keep the name configure and the existing workflow intact, just
switching to overwrite by default.
|
Which workflow do you mean? The one that generates the build plan twice and overwrites (granted, with a backup) a possibly manually user-generated config file, by trying to follow the v1 command sequence using v2 commands? |
To be clear I'm fine with it not generating the build plan a second time. And I'm fine with it being reconfigure instead of overwrite or vice versa, which ever people prefer. I think the command has somewhat weird semantics and they can be fixed, but we should do so while keeping the name. I think in irc we resolved that overloading user-config is not a good idea since they're just fundamentally different things. |
Okay, so some of the conversation shifted to IRC. Here's a recap of what we came to:
|
more bikeshedding, feel free to ignore: I think --{enable,disable}-overwrite is a bad name, since:
so I suggest to name it --{enable,disable}-backup, with default to enable |
I do agree with that, even I, while implementing the changes, got confused with the names. |
This commit straightens the v2-configure command: * Removes the pre-build phase * Adds two flags, --append and --overwrite Co-authored-by: Emily Pillmore <emilypi@cohomolo.gy>
This commit straightens the v2-configure command: * Removes the pre-build phase * Adds two flags, --append and --overwrite Co-authored-by: Emily Pillmore <emilypi@cohomolo.gy>
This commit straightens the v2-configure command: * Removes the pre-build phase * Adds two flags, --append and --overwrite Co-authored-by: Emily Pillmore <emilypi@cohomolo.gy>
This commit straightens the v2-configure command: * Removes the pre-build phase * Adds two flags, --append and --overwrite Co-authored-by: Emily Pillmore <emilypi@cohomolo.gy>
Per a discussion in #7402, in which @ptkato implemented a solution for #5591, @phadej linked a discussion from #7180 in which there are some differences pointed out between
v1-(re)configure
andv2-(re)configure
. Namely, the following:v2-configure
is not a useful command, and thereforev2-reconfigure
is similarly not useful.v2-configure
does two things: generate a build plan, and create acabal.project.local
with project-local settings. The reasons this is not useful are two-fold:v2-build
already generates a build plan autonomously, making thev2-configure
build plan step redundantcabal.project.local
via command-line args passed tov2-configure
is under-specified. One can only pass a subset of validcabal.project.local
flags via command line (Oleg points out that you cannot specify remote source repositories, for example). So in that sense, the implementation is under-specified and hides some implementation details.Here are a few ideas for what we can do here:
Deprecate
v2-configure
and tell the users why it's not a bad idea, tossing away thev2-reconfigure
work from cabal v2-configure #7402. Many people would probably balk at this, since it removes a useful workflow from people's tooling (script-local modifications are faster than hand-editing the local project files) there is a proliferation of content out there that alludes tov1-configure
, and we'd have to be very loud and explicit about why that command in particular was deprecated.Modify
v2-configure
and re-spec it's purpose so that it only does modifications of thecabal.project.local
, and see if we can come up with a decent middle ground for what flags we support on command line.Your thoughts welcome.
The text was updated successfully, but these errors were encountered: