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

Design the sage api #382

Open
samreid opened this issue Oct 23, 2024 · 1 comment
Open

Design the sage api #382

samreid opened this issue Oct 23, 2024 · 1 comment

Comments

@samreid
Copy link
Member

samreid commented Oct 23, 2024

We currently have sage run js/myscript.ts which is a reasonable API.

We may like sage lint and sage check. But it is kind of magical how it discovers the tasks. So we may want to design the visited tasks well, or alternatively have sage task lint etc. But that is less user-friendly.

We could try implementing sage run as a task, like js/grunt/tasks/run.ts. This would put things more on equal footing.

Overall, the main problems in this area are about task discovery and forwarding.

We could add our own language for configuring tasks like: sage.config.ts, then they can inherit from each other, etc. Research if a similar system exists. deno appears to have a well-designed API that we could review.

Design the sage API with the idea that in the future we may want to switch to deno or another runtime.

@zepumph
Copy link
Member

zepumph commented Oct 24, 2024

We discussed this today. And would like to proceed with this plan for now. Much of this is focused around #383.

We will delete the task resolution and just keep sage run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants