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

docgen ignores modules with annotated types #1009

Closed
woeps opened this issue Jun 7, 2024 · 2 comments
Closed

docgen ignores modules with annotated types #1009

woeps opened this issue Jun 7, 2024 · 2 comments

Comments

@woeps
Copy link
Contributor

woeps commented Jun 7, 2024

Docgen does not generate json entries for modules annotated with a module type: module M: MT = ....
Annotated modules should be just included in the generated json as any other module.

Example

// Example.res
module type MT = {
  let x: int
}

module M: MT = {
  let x = 42
}

generates

{
  "name": "Example",
  "docstrings": [],
  "source": {
    "filepath": "src/Example.res",
    "line": 1,
    "col": 1
  },
  "items": [
  {
    "id": "Example.MT",
    "name": "MT",
    "kind": "moduleType",
    "docstrings": [],
    "source": {
      "filepath": "src/Example.res",
      "line": 1,
      "col": 13
    },
    "items": [
    {
      "id": "Example.MT.x",
      "kind": "value",
      "name": "x",
      "signature": "let x: int",
      "docstrings": [],
      "source": {
        "filepath": "src/Example.res",
        "line": 2,
        "col": 3
      }
    }]
    // Module M is missing here
  }]
}

Note: This behavior was first stated in #902, but was added as a separate issue for transparency.

@woeps
Copy link
Contributor Author

woeps commented Jun 10, 2024

Seems like #1018 is addressing this.

@zth
Copy link
Collaborator

zth commented Jun 10, 2024

Closed in #1018

@zth zth closed this as completed Jun 10, 2024
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

No branches or pull requests

2 participants