feat(cmd): support link resolution with partial filesystems #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andlang.Config
types as well aslang.NewConfig()
have been changed in breaking ways to accommodate the change.