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

How to install external libraries in CUE #2223

Closed
debuggerrr opened this issue Jan 23, 2023 · 4 comments
Closed

How to install external libraries in CUE #2223

debuggerrr opened this issue Jan 23, 2023 · 4 comments
Labels
Triage Requires triage/attention

Comments

@debuggerrr
Copy link

How can I install libraries in cue via shell? Suppose I want to install "fmt" for printing purposes but I didn't find a way to install it. In GO it comes by default but how to manage it in CUE?

@debuggerrr debuggerrr added the Triage Requires triage/attention label Jan 23, 2023
@verdverm
Copy link

There is no fmt package in CUE. There is a tool/cli.Print available in the scripting layer.

The dependency management system is still TBD, but will be very close to Go's. In the meantime, you can install 3rd party modules following one of the methods here: https://cuetorials.com/first-steps/modules-and-packages/

@debuggerrr
Copy link
Author

debuggerrr commented Jan 23, 2023

@verdverm I tried importing this tool/cli.print but it gave me the below error:

package "tool/cli.Print" imported but not defined in :
    ./mycue.cue:3:2
#Component: reference "Print" not found:
    ./mycue.cue:11:2

I used Print(var) or is there any other way of using it? or do I need to follow the link you shared for importing this package?

@mvdan
Copy link
Member

mvdan commented Jan 23, 2023

Package management, for tracking dependencies, is under the proposal at #851. For any other related questions, like getting help to use tool/cli, see https://github.com/cue-lang/cue#contact. Note that the package is tool/cli, not tool/cli.Print.

@mvdan mvdan closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2023
@debuggerrr
Copy link
Author

Cool. Thanks will explore that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage Requires triage/attention
Projects
None yet
Development

No branches or pull requests

3 participants