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

docs: Improve CONTRIBUTING.md #800

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

not-my-profile
Copy link
Contributor

@not-my-profile not-my-profile commented Aug 11, 2023

Please review this commit by commit and see the individual commit messages for an explanation of the changes.

There is no need to build the whole workspace, using `-p typos-dict`
spares the contributor from needlessly building 261 crates.
The instructions previously instructed the contributor
to run `SNAPSHOTS=overwrite cargo test` which will however
fail when the added entry is duplicate with:

    thread 'codegen' panicked at 'Duplicate present: ...'

Duplicates have to be removed by firstly running the verify
test with SNAPSHOTS=overwrite before you should try running
the code generation.

These were actually the steps before they were
changed in 7eb8873
(which appears to have been an oversight).
@@ -41,11 +41,11 @@ Otherwise, to add to the dictionary:

Format: `typo,correction[,correction...]`

2. Code-gen the dictionary
2. Verify (and postprocess) the dictionary

With `cargo` and `rustfmt` installed, run
Copy link
Collaborator

Choose a reason for hiding this comment

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

This instruction is for the code-gen one


With `cargo` and `rustfmt` installed, run
```console
$ SNAPSHOTS=overwrite cargo test -p typos-dict
$ SNAPSHOTS=overwrite cargo test -p typos-dict verify
```
(we do development-time code-gen to speed up builds)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This belongs in the code-gen section

@@ -41,11 +41,11 @@ Otherwise, to add to the dictionary:

Format: `typo,correction[,correction...]`

2. Code-gen the dictionary
2. Verify (and postprocess) the dictionary
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the original intention was to run both steps here and then in Step 3, run the command to verify everything is resolved.

There is the annoying aspect though of needing to run verify before codegen

@lafrenierejm
Copy link

@not-my-profile, @epage It looks like this has been stale for a bit. Mind if I open a new PR to address the feedback so we can eventually get these changes through to acceptance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants