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

cli: allow calling core functions directly #7310

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

helderco
Copy link
Contributor

@helderco helderco commented May 7, 2024

Fixes #6947

Can be run from anywhere as it doesn't require a module to load:

Screenshot 2024-05-20 at 18 47 41

Todo

  • Bikeshedding on the value for -m (currently: -)
  • Add tests

@helderco helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from ea1d2ce to 797666b Compare May 20, 2024 17:30
@helderco helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from 797666b to 27589db Compare May 20, 2024 18:51
@helderco helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from 27589db to babaf87 Compare May 21, 2024 14:41
@helderco
Copy link
Contributor Author

helderco commented May 22, 2024

Update: based on discussion in #6947, may need to make some changes:

- dagger -m- container
+ dagger -m container

Check if what's in -m matches a field under Query first, and fallback to the usual module loading behavior if not.

@helderco helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from babaf87 to 0751d1f Compare May 29, 2024 07:16
This removes `sync` as a default selection for commands ending in a `Container`, `Directory` or `File`.

Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
@helderco helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from 0751d1f to 86e4ba2 Compare May 29, 2024 07:21
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

Successfully merging this pull request may close these issues.

Allow calling core functions from the CLI
1 participant