-
Notifications
You must be signed in to change notification settings - Fork 710
Deduplicate documentation of cabal commands #9217
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
Deduplicate documentation of cabal commands #9217
Conversation
doc/cabal-commands.rst
Outdated
Clone the package's source repository (Darcs, Git, etc.) instead | ||
of downloading the tarball. Only works if the package specifies | ||
a ``source-repository``. | ||
Clone the package's source repository using the appropriate version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that this is more general, but we do not support every VCS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cabal get
command, and especially the -s
option was documented twice. The formulation in section 5.2
used the explicit list of VCS's and the formulation in 6.2
used the one that I have used here with "using the appropriate version control system". When I combined them I picked the latter version, but I can also use the alternative. I will add a commit.
Edit: a282425
|
||
Opening an interpreter session | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
While developing a package, it is often useful to make its code | ||
available inside an interpreter session. This can be done with the | ||
``repl`` command: | ||
|
||
.. code-block:: console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that all this block contains no useful information? I am checking current manual for repl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree that this is useful information, but I think it is not in the correct place to write it down. It looks to me that section 6.2 wants to be the reference section for all the things that can be written in the package description/.cabal file. For some sections (such as executable, testsuite and benchmark) of the cabal file it makes sense to refer to the documentation of cabal run
cabal test
and cabal bench
, because these commands are directly related to the subsections. But commands such as cabal repl
and cabal get
which were also documented in section 6.2 do not correspond to a specific section of the cabal file, but to general workflows with cabal-install
instead. A command such as cabal repl
should be documented in the command reference section, and maybe also in the sections 1+2+3 which describe general cabal workflows.
I agree with the spirit of the patch, but I would like to have references from 6.2.x to the appropriate command doc. By skimming the patch it seems some got lost in rewrite (e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good
a282425
to
7aca4bf
Compare
c025d91
to
7aca4bf
Compare
The failing test seemed to be flaky. I did 2 force pushes to restart the pipeline. |
@Mergifyio refresh |
✅ Pull request refreshed |
7aca4bf
to
e902b1c
Compare
Fixes #9216
Documentation of various
cabal-install
commands is split between section5.2
and section6.2
.This PR was written under the assumption that the documentation of these subcommands is in the wrong place in
6.2
, which otherwise only contains documentation about the .cabal file format.(Andreas: rendering of this PR at:)