Skip to content
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

Some commands ignore --dry-run and --only-download #7379

Closed
fgaz opened this issue May 3, 2021 · 3 comments · Fixed by #7407
Closed

Some commands ignore --dry-run and --only-download #7379

fgaz opened this issue May 3, 2021 · 3 comments · Fixed by #7407

Comments

@fgaz
Copy link
Member

fgaz commented May 3, 2021

Follow-up to #7351, in which v1-install failed outright.

Apparently some commands completely ignore --dry-run (and now --only-download), and just perform the task. Ideally they should tell what would happen (eg. the executable "xyz" would be run), but just not doing the thing would be ok too.

Commands that behave incorrectly:

  • v2-configure (creates the project file)
  • v2-freeze (creates the freeze file)
  • v2-run (runs the executable)
  • v2-exec (runs the command)

Commands that behave correctly:

  • v2-repl
  • v2-build
  • v2-install
  • v2-haddock
  • v2-test
  • v2-bench (probably. I didn't check)
@aaronallen8455
Copy link
Contributor

I can work on this issue.

@fgaz
Copy link
Member Author

fgaz commented May 24, 2021

That's great!

Those commands are all implemented in cabal-install/src/Distribution/Client/Cmd*.hs and they have similar structure. Feel free to ask here or on IRC if you get stuck or need pointers.

aaronallen8455 added a commit to aaronallen8455/cabal that referenced this issue May 25, 2021
Changes the behavior of the following commands under the --dry-run flag
- `v2-configure` and `v2-freeze` print out what the file contents
would've been rather than writing the file.
- `v2-exec` and `v2-run` print out the command that would've been
executed rather than doing so.

Adds package tests for the configure and freeze commands.
aaronallen8455 added a commit to aaronallen8455/cabal that referenced this issue May 25, 2021
Changes the behavior of the following commands under the --dry-run flag
- `v2-configure` and `v2-freeze` print out what the file contents
would've been rather than writing the file.
- `v2-exec` and `v2-run` print out the command that would've been
executed rather than doing so.

Adds package tests for the configure and freeze commands.
@aaronallen8455
Copy link
Contributor

Thanks, will do! I have opened #7407 for this issue.

aaronallen8455 added a commit to aaronallen8455/cabal that referenced this issue May 25, 2021
Changes the behavior of the following commands under the --dry-run flag
- `v2-configure` and `v2-freeze` print out what the file contents
would've been rather than writing the file.
- `v2-exec` and `v2-run` print out the command that would've been
executed rather than doing so.

Adds package tests for the configure and freeze commands.
aaronallen8455 added a commit to aaronallen8455/cabal that referenced this issue May 27, 2021
Changes the behavior of the following commands under the --dry-run flag
- `v2-configure` and `v2-freeze` print out what the file contents
would've been rather than writing the file.
- `v2-exec` and `v2-run` print out the command that would've been
executed rather than doing so.

Adds package tests for the configure and freeze commands.
aaronallen8455 added a commit to aaronallen8455/cabal that referenced this issue Jun 3, 2021
Changes the behavior of the following commands under the `--dry-run` and
`--only-download` flags
- `v2-configure` and `v2-freeze` do not write their respective files
- `v2-exec` and `v2-run` do not run the target executable

Adds package tests for the configure and freeze commands.
emilypi added a commit to aaronallen8455/cabal that referenced this issue Jun 3, 2021
@fgaz fgaz linked a pull request Jun 3, 2021 that will close this issue
3 tasks
aaronallen8455 added a commit to aaronallen8455/cabal that referenced this issue Jun 4, 2021
Changes the behavior of the following commands under the `--dry-run` and
`--only-download` flags
- `v2-configure` and `v2-freeze` do not write their respective files
- `v2-exec` and `v2-run` do not run the target executable

Adds package tests for the configure and freeze commands.
@fgaz fgaz closed this as completed in #7407 Jun 5, 2021
fgaz pushed a commit that referenced this issue Jun 5, 2021
Changes the behavior of the following commands under the `--dry-run` and
`--only-download` flags
- `v2-configure` and `v2-freeze` do not write their respective files
- `v2-exec` and `v2-run` do not run the target executable

Adds package tests for the configure and freeze commands.
mergify bot pushed a commit that referenced this issue Jun 5, 2021
Changes the behavior of the following commands under the `--dry-run` and
`--only-download` flags
- `v2-configure` and `v2-freeze` do not write their respective files
- `v2-exec` and `v2-run` do not run the target executable

Adds package tests for the configure and freeze commands.

(cherry picked from commit 84884bb)

# Conflicts:
#	cabal-install/src/Distribution/Client/CmdConfigure.hs
#	cabal-install/src/Distribution/Client/CmdRun.hs
fgaz pushed a commit to fgaz/cabal that referenced this issue Jun 5, 2021
Changes the behavior of the following commands under the `--dry-run` and
`--only-download` flags
- `v2-configure` and `v2-freeze` do not write their respective files
- `v2-exec` and `v2-run` do not run the target executable

Adds package tests for the configure and freeze commands.

(cherry picked from previous version of commit 84884bb)
fgaz pushed a commit that referenced this issue Jun 5, 2021
Changes the behavior of the following commands under the `--dry-run` and
`--only-download` flags
- `v2-configure` and `v2-freeze` do not write their respective files
- `v2-exec` and `v2-run` do not run the target executable

Adds package tests for the configure and freeze commands.

(cherry picked from previous version of commit 84884bb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment