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

Follow symlinks when discovering root modules #241

Open
radeksimko opened this issue Jul 22, 2020 · 0 comments
Open

Follow symlinks when discovering root modules #241

radeksimko opened this issue Jul 22, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@radeksimko
Copy link
Member

Current Version

0.5.3

Use-cases

The discovery of root modules may not work reliably for users which use symlinks in the paths leading to root modules as we do not currently resolve symlinks. Discovered paths get compared with paths in module manifest files, which may or may not be resolved symlinks and therefore may or may not match.

Attempted Solutions

Always use resolved paths everywhere, or avoid symlinks.

Proposal

Resolve symlinks where necessary:

func (rmm *rootModuleManager) AddAndStartLoadingRootModule(ctx context.Context, dir string) (RootModule, error) {
dir = filepath.Clean(dir)
// TODO: Follow symlinks (requires proper test data)

func (rmm *rootModuleManager) RootModuleCandidatesByPath(path string) RootModules {
path = filepath.Clean(path)
// TODO: Follow symlinks (requires proper test data)

// TODO: Follow symlinks (requires proper test data)

and add relevant test cases to verify functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant