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

Initial basic support for CUE #1781

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Initial basic support for CUE #1781

merged 1 commit into from
Oct 24, 2023

Conversation

hairyhenderson
Copy link
Owner

@hairyhenderson hairyhenderson commented Jul 2, 2023

Fixes #1601

This adds CUE support to gomplate as a native datasource format, as well as data.CUE/cue and data.ToCUE/toCUE functions to allow inline parsing and rendering.

CUE has support for modules and packages (ability to import data from other files), which doesn't work just yet. Key to this is providing a filename, which is awkward with the current parseData signature.

I'll keep this in draft until I'm happy with a solution for this (or until I decide to simply not support importing).

At least to start, CUE support will be single-file only, with no support for importing local packages.

@hairyhenderson
Copy link
Owner Author

Update on importing packages from the local filesystem: I may just be missing something, but I just don't think it's going to be possible. Even with providing a filename and import path at parse-time, imports fail.

So at least initially, CUE support will be partial and not support imports (importing builtins does work, though).

@hairyhenderson hairyhenderson changed the title Support for CUE Initial basic support for CUE Jul 3, 2023
@hairyhenderson hairyhenderson force-pushed the cue-support-1601 branch 2 times, most recently from 8bdce36 to 1b9c934 Compare July 3, 2023 13:28
@hairyhenderson hairyhenderson marked this pull request as ready for review July 3, 2023 13:28
@github-actions
Copy link

This pull request is stale because it has been open for 60 days with
no activity. If it is no longer relevant or necessary, please close
it. Given no action, it will be closed in 14 days.

If it's still relevant, one of the following will remove the stale
marking:

  • A maintainer can add this pull request to a milestone to indicate
    that it's been accepted and will be worked on
  • A maintainer can remove the stale label
  • Anyone can post an update or other comment
  • Anyone with write access can push a commit to the pull request
    branch

Signed-off-by: Dave Henderson <[email protected]>
@hairyhenderson hairyhenderson enabled auto-merge (squash) October 21, 2023 17:13
@github-actions github-actions bot removed the Stale label Oct 22, 2023
@hairyhenderson hairyhenderson merged commit b669b8a into main Oct 24, 2023
12 checks passed
@hairyhenderson hairyhenderson deleted the cue-support-1601 branch October 24, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

please add cue as a native format
1 participant