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

[Bug] Timoni cannot handle symlinks in cue.mod #467

Open
jmgilman opened this issue Jan 9, 2025 · 0 comments
Open

[Bug] Timoni cannot handle symlinks in cue.mod #467

jmgilman opened this issue Jan 9, 2025 · 0 comments

Comments

@jmgilman
Copy link
Contributor

jmgilman commented Jan 9, 2025

Steps to reproduce:

  1. Create a new Timoni module
  2. Define a custom CUE module somewhere else on the local filesystem
  3. Symlink the custom CUE module somewhere in the Timoni module under cue.mod/pkg
  4. Integrate the custom CUE module in the Timoni module somewhere
  5. Attempt to build the Timoni module and get an error stating the custom CUE module cannot be found

This is becoming an increasingly common use-case as CUE module development progresses. Currently, the CUE module system doesn't have something similar to Go's replace directive, however, it does explicitly support symlinking modules into cue.mod. To give a more clear example:

timoni build -f debug_values.cue test .   # This fails
cue cmd -t debug -t name=test -t namespace=test -t mv=1.0.0 -t kv=1.28.0 build  # This does not

So, calling CUE directly builds the module without issue. However, Timoni reports:

timoni.sh/blueprint@v0:main.timoni.sh/blueprint/config: import failed: import failed: cannot find package "mymod/mypackage": cannot find module providing package mymod/mypkg:
    ./timoni.cue:9:2
    ./config/config.cue:5:2

Where cue.mod/pkg/mymod is symlinked to a CUE module folder exposing a mypkg package.

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

No branches or pull requests

1 participant