-
Notifications
You must be signed in to change notification settings - Fork 412
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
feat: Config defaults for dune-project #10835
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
eb4c096
initial support for authors default from config
H-ANSEN cab0a11
refactor to make solution more generic
H-ANSEN 0431f28
remove all "Default_author" references
H-ANSEN e0cf5a3
add support for license in config
H-ANSEN a425471
apply clean up for existing tests
H-ANSEN 083f8de
fmt
H-ANSEN ecb5984
add initial test cases
H-ANSEN eeb6f54
add inital documentation for project_defaults stanza
H-ANSEN 7521fa0
refactor how default values are passed from config to example
H-ANSEN 0f38f2f
attempt fix for failing tests
H-ANSEN 994e312
add additional test cases verifying stanza behavior
H-ANSEN 10f1e25
revise documentation page of project_defaults stanza
H-ANSEN ad73096
update package_info.ml to conform with recently pushed changes
H-ANSEN 584a523
Merge branch 'main' into dune-proj-config-defaults
H-ANSEN 9fdc492
update defaults fixing failing test case
H-ANSEN 5af0e72
allow empty but defined stanza copying dune-project behavior
H-ANSEN 35003b0
clean up doc and add chagelog file
H-ANSEN 8fbff04
_
rgrinberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- Add support for specifying default values of the `authors`, `maintainers`, and | ||
`license` stanzas of the `dune-project` file via the dune config file. Default | ||
values are set using the `(project_defaults)` stanza (#10835, @H-ANSEN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
project_defaults | ||
---------------- | ||
|
||
.. versionadded:: 3.17 | ||
|
||
Specify default values for stanzas ``authors``, ``maintainers``, and ``license`` | ||
of the :doc:`../dune-project/index` file when initializing a project with | ||
``dune init proj``. The format of the 'project_defaults' stanza is as follows: | ||
|
||
.. code:: dune | ||
|
||
(project_defaults | ||
<optional-fields>) | ||
|
||
``<optional-fields>`` are: | ||
|
||
.. describe:: (authors <string(s)>) | ||
|
||
Specify authors. | ||
|
||
Example: | ||
|
||
.. code:: dune | ||
|
||
(project_defaults | ||
(authors | ||
"Jane Doe <jane.doe@example.com>" | ||
"John Doe <john.doe@example.com>")) | ||
|
||
.. describe:: (maintainers <string(s)>) | ||
|
||
Specify maintainers. | ||
|
||
Example: | ||
|
||
.. code:: dune | ||
|
||
(project_defaults | ||
(maintainers | ||
"Jane Doe <jane.doe@example.com>" | ||
"John Doe <john.doe@example.com>")) | ||
|
||
.. describe:: (license <string(s)>) | ||
|
||
Specify license, ideally as an identifier from the `SPDX License List | ||
<https://spdx.org/licenses/>`__. | ||
|
||
Example: | ||
|
||
.. code:: dune | ||
|
||
(project_defaults | ||
(license "MIT")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 wonder, if this could link to the definition of
authors
in thedune-project
reference?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 couldn't find any relevant definition of
authors
in the reference, I'm sure I am just glancing over it though. I made all the other requested changes as well as adding a.. versionadded 3.17
to the top of the doc page!