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

Generate documentation from source code #333

Closed
8 tasks done
yorickpeterse opened this issue Sep 12, 2022 · 4 comments
Closed
8 tasks done

Generate documentation from source code #333

yorickpeterse opened this issue Sep 12, 2022 · 4 comments
Assignees
Labels
compiler Changes related to the compiler feature New things to add to Inko, such as a new standard library module
Milestone

Comments

@yorickpeterse
Copy link
Collaborator

yorickpeterse commented Sep 12, 2022

Inko's compiler should provide a way of generating documentation from source code, using the command inko doc. When doing so, dependencies of the project (i.e. everything not in ./src) should be skipped.

The output of this command is a set of JSON files, with one file per Inko module. Each JSON file contains the documentation of the module, its types, methods, etc. We won't be producing HTML directly, as I don't want to maintain what is basically a static site generator.

Inko's lexer already supports extracting comments, but the parser just discards these. We'll need to provide an option which when set causes the parser to store the comments somewhere for later use.

Generating documentation would still run the type checker, as generating documentation depends on typing information. Essentially we'd have to map the source comments to entries in the type database, then serialise that to JSON.

idoc TODO

Inko TODO

  • Generate standard library documentation after publishing the release archive
  • Generate standard library documentation for main for every push
    • How do we deal with cases where main introduces breaking changes, but the third-party dependencies target the latest public release? Do we just allow this job to fail?
  • Should idoc be a separate repository, or be included in the main repository?
    • If idoc is a completely separate tool (that just happens to ingest data from inko doc), then keeping it separate is probably best
  • Document the new setup
@yorickpeterse yorickpeterse added feature New things to add to Inko, such as a new standard library module and removed type::feature labels Mar 15, 2023
@yorickpeterse yorickpeterse removed this from the 0.2.5 milestone Mar 15, 2023
@yorickpeterse yorickpeterse added this to the 0.15.0 milestone Jun 6, 2023
@yorickpeterse yorickpeterse self-assigned this Jun 6, 2023
yorickpeterse added a commit that referenced this issue May 20, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
@yorickpeterse
Copy link
Collaborator Author

The inko-doc branch now contains the necessary changes to produce a bunch of JSON files containing documentation information. Rather than including a static site generator (amongst other things) directly in the inko executable, we'll use https://github.com/inko-lang/idoc to turn these files into HTML and what not.

For this to work, the idoc executable needs to know where the assets are stored such that it can copy them over into the generated site. The paths for that should be configurable at build time, meaning we'd need to include #664 as well.

yorickpeterse added a commit that referenced this issue May 20, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 21, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
@yorickpeterse
Copy link
Collaborator Author

yorickpeterse commented May 21, 2024

#664 is taken care of. The next step is to upgrade the following packages to be compatible with Inko 0.15.0, such that we can use them to build the documentation generator idoc:

yorickpeterse added a commit that referenced this issue May 22, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 22, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 23, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 26, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 27, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 27, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 27, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 27, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 28, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 29, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 30, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue May 31, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 3, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 3, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 3, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 3, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 3, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 4, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 4, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 4, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 4, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 5, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 5, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 5, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 5, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 5, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 6, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 6, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 7, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 7, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 7, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 7, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 7, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 10, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 10, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 12, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 14, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 15, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 18, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 19, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 19, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 21, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
yorickpeterse added a commit that referenced this issue Jun 21, 2024
This adds the command "inko doc", producing a set of JSON files
containing documentation about modules and their symbols. These files
can then be used by a separate tool to generate a website, manual pages,
and so on.

This fixes #333.

Changelog: added
@yorickpeterse yorickpeterse reopened this Jun 22, 2024
@yorickpeterse
Copy link
Collaborator Author

cefa664 adds the inko doc command, producing a set of JSON files containing documentation information.

https://github.com/inko-lang/idoc/ takes these files and converts them to HTML. idoc uses dependencies not part of the standard library, meaning that a new Inko release may require some changes to be made to idoc after the Inko release. If we ship idoc as part of a release, this creates a circular dependency preventing us from releasing a new Inko version. Turning idoc into a separate tool means that in the worst case we have to re-run some failing CI job to generate a release's documentation files, which won't block a release as this will be done at the end of the release pipeline.

@yorickpeterse
Copy link
Collaborator Author

For installing idoc, one can just use the make install task for the time being. In the coming weeks I want to set up something like https://docs.rs/ such that most users won't even need to install idoc to begin with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Changes related to the compiler feature New things to add to Inko, such as a new standard library module
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant