Skip to content

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

Merged
merged 7 commits into from
Sep 19, 2023

Conversation

BinderDavid
Copy link
Contributor

@BinderDavid BinderDavid commented Aug 29, 2023

Fixes #9216

Documentation of various cabal-install commands is split between section 5.2 and section 6.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:)

@BinderDavid BinderDavid changed the title Remove duplicate documentation Deduplicate documentation of cabal commands Aug 29, 2023
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
Copy link
Collaborator

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.

Copy link
Contributor Author

@BinderDavid BinderDavid Sep 5, 2023

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

Comment on lines -1023 to -1031

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
Copy link
Collaborator

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

Copy link
Contributor Author

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.

@ffaf1
Copy link
Collaborator

ffaf1 commented Sep 4, 2023

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. repl). If I am wrong, please correct me!

Copy link
Member

@andreasabel andreasabel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM.

@Kleidukos Kleidukos requested a review from ffaf1 September 14, 2023 17:34
Copy link
Collaborator

@ffaf1 ffaf1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@BinderDavid BinderDavid added the merge me Tell Mergify Bot to merge label Sep 14, 2023
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Sep 16, 2023
@Mikolaj Mikolaj force-pushed the remove-duplicate-documentation branch from a282425 to 7aca4bf Compare September 16, 2023 20:41
@BinderDavid BinderDavid force-pushed the remove-duplicate-documentation branch 2 times, most recently from c025d91 to 7aca4bf Compare September 19, 2023 19:00
@BinderDavid
Copy link
Contributor Author

The failing test seemed to be flaky. I did 2 force pushes to restart the pipeline.

@BinderDavid
Copy link
Contributor Author

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Sep 19, 2023

refresh

✅ Pull request refreshed

@Mikolaj Mikolaj force-pushed the remove-duplicate-documentation branch from 7aca4bf to e902b1c Compare September 19, 2023 21:37
@mergify mergify bot merged commit c4e1268 into haskell:master Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attention: needs-review documentation merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation of various cabal-install commands is duplicated in Package Description section
4 participants