phetsims / perennial

Maintenance tools that won't change with different versions of chipper checked out
MIT License
2 stars 5 forks source link

Determine when to use `grunt/tasks/` vs `js/scripts/` #370

Open zepumph opened 1 week ago

zepumph commented 1 week ago

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:

  1. Free for all, either are pretty much equal, so we can just do what is best in the moment
  2. grunt/tasks/ are repo-specific, and require a --repo. So for example grunt production stays in perennial/grunt/tasks/ but grunt clone-missing-repos moves to js/scripts/.
  3. js/scripts/ are more informal, and less public. grunt/tasks are the list of processes supported with scenery stack and public use.
  4. We don't necessarily need to do anything for this issue. Things haven't been too challenging or confusing to me personally. Let's make sure we don't add complexity and maintenance burden without provided proper value.

Let's discuss at a dev meeting at some point.

zepumph commented 6 days 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.

zepumph commented 4 days ago

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).

zepumph commented 3 days ago

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.