Skip to content

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

@jmgilman

Description

@jmgilman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions