Open zepumph opened 1 week ago
We cannot use grunt to forward a tasks to scripts because it is bossy and grunt run myScript
tries to treat run
and myScript
both as grunt tasks.
Discussion in dev meeting today:
MK/SR Build tool update: We would like to discuss our definitions for what makes something a grunt task vs a script: https://github.com/phetsims/perennial/issues/370 MK likes the notion that grunt tasks for a “public” API, and provide a sense of stability for older releases and for sceneryStack. There are other ideas also, though, listed in the issue. How do devs feel about js/scripts vs js/grunt/tasks? JG: I don’t care too much, and I trust others. JB: +1 MS: +1 BM: Would a dividing line be about the amount of QA the code gets? BF: Noting that with scenery stack we are drawing a line in documentation in phet-info, so I like the idea that we trim or organize to provide only the information/tools that a non-PhET member needs and not present them with extra that they will never use and will just be confusing. JB: I currently think of grunt tasks for building/releasing sims, and scripts for maintaining the code base (pull/clone/update). I am good with anything. I’m also happy to just move all scripts into grunt tasks to just have one spot. CM: What about moving away from grunt? MK: When we say “grunt”, we aren’t hard coding ourselves any further into grunt, we are just talking about grunt as our main task entrypoint for sim development. MK and SR will come back with a proposal. (noting that we did not hear from JO).
A similar but separate conversation to be had is about what code lives in chipper and what lives in perennial. Since we can use perennial-alias, technically everything could be in perennial. I doubt that is best though.
Keeping with a general idea that chipper is a versioned code base for building sims, over in https://github.com/phetsims/chipper/issues/1489 I decided to keep the lint-all task in chipper, since it uses getPhetLibs to discover what sims should be linted. This feels right to me, and then it can use the lint
command from perennial-alias.
Since work in https://github.com/phetsims/chipper/issues/1437, the lines have blurred between a grunt task and node script. I believe that devs should have a conversation about what we would like to define as a grunt task vs just a script. Some ideas:
grunt/tasks/
are repo-specific, and require a--repo
. So for examplegrunt production
stays inperennial/grunt/tasks/
butgrunt clone-missing-repos
moves tojs/scripts/
.js/scripts/
are more informal, and less public.grunt/tasks
are the list of processes supported with scenery stack and public use.Let's discuss at a dev meeting at some point.