phetsims / perennial

Maintenance tools that won't change with different versions of chipper checked out
http://scenerystack.org/
MIT License
5 stars 5 forks source link

Design the sage api #382

Open samreid opened 1 month ago

samreid commented 1 month ago

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 commented 1 month ago

We discussed this today. And would like to proceed with this plan for now. Much of this is focused around https://github.com/phetsims/perennial/issues/383.

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