-
Notifications
You must be signed in to change notification settings - Fork 347
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
Improve CONTRIBUTING.md by adding some guidance into the codebase for people who want to contribute to the code #5858
base: master
Are you sure you want to change the base?
Conversation
… people who want to contribute to the code
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 a lot for this PR!!
|
||
As long as you have the dependencies, compiling opam is as simple as: | ||
``` | ||
./configure |
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.
./configure | |
./configure --enable-developer-mode |
i don't know if it is still needed with the ability to have several caches now
### Layout | ||
|
||
The source code of opam is located in `src`. In this directory you will find subdirectories. | ||
Each subdirectories have different puposes: |
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.
We could link to https://opam.ocaml.org/doc/api/
|
||
Each `*.test` files in `tests/reftests` start with either `N0REP0` (empty repository, note the zeros) or a valid hash coming from opam-repository that the test starts with. | ||
|
||
After that every lines starting with `### ` will be parsed as either a command or a custom action as defined by `tests/reftests/run.ml`, everything else will be the output of the command or the input of the custom commands, with the exception of `# Return code <n> #` when the command returns a non-zero exit code. |
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.
Redirect to run.ml for more specific documentation on the syntax?
make reftest-<name of the test> DUNE_ARGS="--auto-promote" | ||
``` | ||
if you want to regenerate a test based on the new output of opam. | ||
|
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.
Should we also add how to add a new test file? It is maybe too specific for a generic contributing section.
|
||
If you have opam installed already, you can call: | ||
``` | ||
opam install --deps-only -t . |
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 -t
is here for opam-devel ?
``` | ||
if you want to regenerate a test based on the new output of opam. | ||
|
||
### Layout |
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.
Should we also add a section on the doc?
I'm unsure if there already was such documentation somewhere but in any case it could be a nice entry point for potential contributors
TODO:
shell/
(install.sh, bootstrap, "other scripts")