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(cmd): support link resolution with partial filesystems #19

Merged
merged 1 commit into from
Apr 4, 2020

Conversation

princjef
Copy link
Owner

@princjef princjef commented Apr 4, 2020

Current code link resolution relies on being able to either resolve the repository information from the current filesystem or a relative path from the working directory to the repository root being provided.

In contexts where the working directory is a subpath of the repository and only a portion of the repository is loaded in the filesystem where documentation is being generated/verified, the root of the repository may not be present or even valid in the filesystem. This makes generating complete documentation under such systems impossible today.

To combat this, the option to provide the root location of the repository (repository.directory) has been changed to one which specifies the path from the root of the repository to the current directory (repository.path). This is expected to be provided as an absolute path from the repository root. With this change, links can be generated/verified in any environment, including those with partial filesystems.

Since an option had to be replaced, this is a breaking change to the CLI command. Similarly, the lang.Location and lang.Config types as well as lang.NewConfig() have been changed in breaking ways to accommodate the change.

BREAKING CHANGE: The repository.directory option is now repository.path
and must be provided with a path from the repository root to the working
directory when used. Related data structures and functions have also
been modified to support this use case.
@princjef princjef merged commit 86af0ae into master Apr 4, 2020
@princjef princjef deleted the repo-path branch April 4, 2020 21:41
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.

1 participant