-
Notifications
You must be signed in to change notification settings - Fork 49
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
go module github.com/databricks/cli
contains invalid paths when importing as dependency
#1629
Comments
pietern
added a commit
that referenced
this issue
Aug 12, 2024
Use of backticks prevents using the repository as a dependency. Fixes #1629.
pietern
added a commit
that referenced
this issue
Aug 12, 2024
While investigating #1629, I found that Go doesn't allow characters outside the set documented at https://pkg.go.dev/golang.org/x/mod/module#CheckFilePath. To fix this, I changed the relevant test case to create the fixtures it needs instead of loading it from the testdata directory (in `renderer_test.go`). Some test cases in `config_test.go` depended on templated paths without needing to do so. In the process of fixing this, I refactored these tests slightly to reduce dependencies between them. This change also adds a test case to ensure that all files in the repository are allowed to be part of a module (per the earlier `CheckFilePath` function). Fixes #1629.
Thanks for reporting. I hadn't tried this before but the repository should be usable as a module. That said, don't expect that all libraries under |
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 12, 2024
## Changes While investigating #1629, I found that Go doesn't allow characters outside the set documented at https://pkg.go.dev/golang.org/x/mod/module#CheckFilePath. To fix this, I changed the relevant test case to create the fixtures it needs instead of loading it from the `testdata` directory (in `renderer_test.go`). Some test cases in `config_test.go` depended on templated paths without needing to do so. In the process of fixing this, I refactored these tests slightly to reduce dependencies between them. This change also adds a test case to ensure that all files in the repository are allowed to be part of a module (per the earlier `CheckFilePath` function). Fixes #1629. ## Tests I manually confirmed I could import the repository as a Go module.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the issue
Inspired by my feature request, I wanted to explore building the functionality myself using
github.com/databricks/cli/libs
as a dependency to build on top. In essence, exposing yourgithub.com/databricks/cli/libs
as valid go modules enables your customers with special needs and fosters a community that voluntarily owns functionality you do not want to maintain.Steps to reproduce the behavior
go mod init whatever
go get github.com/databricks/cli
Expected Behavior
go get github.com/databricks/cli
finishes without errorActual Behavior
go get github.com/databricks/cli
finishes with error:Note
The text was updated successfully, but these errors were encountered: