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

feat(graindoc): Allow doc comments on variants and record fields #1852

Merged
merged 7 commits into from
Jan 31, 2024

Conversation

alex-snezhko
Copy link
Member

Closes #992

provide record R {
  /**
   * A very special number
   */
  x: Number
}

provide enum E {
  /**
   * A thing
   */
  Thing
}

@phated
Copy link
Member

phated commented Jun 3, 2023

Excited to look at this! I'm pretty sure you need to add tests now that @spotandjake added the test harness

Copy link
Member

@spotandjake spotandjake left a comment

Choose a reason for hiding this comment

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

This looks really good, I love how much it cleaner it makes the docs. I just had two little notes to keep the tables in line with the function tables but besides that it looks good.

Also after this is merged someone will need to update the website docs on this feature.

compiler/test/graindoc/types.expected.md Outdated Show resolved Hide resolved
compiler/test/graindoc/types.input.gr Show resolved Hide resolved
@spotandjake spotandjake added the graindoc Issues related to Graindoc label Jun 11, 2023
Copy link
Member

@peblair peblair left a comment

Choose a reason for hiding this comment

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

Looks good, but holding off on an approval until @spotandjake's comments are addressed

Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

I don't like the nested table so I proposed an alternative. Also had a question about levels and a possible bug (that we should fix and add a test for).

compiler/graindoc/docblock.re Outdated Show resolved Hide resolved
compiler/src/diagnostics/comments.re Outdated Show resolved Hide resolved
compiler/src/utils/markdown.re Outdated Show resolved Hide resolved
stdlib/sys/process.gr Show resolved Hide resolved
compiler/test/graindoc/types.expected.md Outdated Show resolved Hide resolved
stdlib/sys/process.md Outdated Show resolved Hide resolved
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

I like the output a lot! I had just a couple comments on the implementation

compiler/graindoc/docblock.re Show resolved Hide resolved
compiler/src/typed/printtyp.re Show resolved Hide resolved
@phated phated changed the title feat(graindoc): Variant, record field comments feat(graindoc): Allow doc comments on variants and record fields Jan 31, 2024
@phated phated added this pull request to the merge queue Jan 31, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jan 31, 2024
@phated phated added this pull request to the merge queue Jan 31, 2024
Merged via the queue into grain-lang:main with commit 53f770c Jan 31, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graindoc Issues related to Graindoc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GrainDoc: Allow documenting Enum variants
4 participants