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

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

Closed
zepumph opened this issue Oct 10, 2024 · 10 comments
Closed

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

zepumph opened this issue Oct 10, 2024 · 10 comments

Comments

@zepumph
Copy link
Member

zepumph commented Oct 10, 2024

Since work in phetsims/chipper#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
Copy link
Member Author

zepumph commented Oct 15, 2024

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
Copy link
Member Author

zepumph commented Oct 17, 2024

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: #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
Copy link
Member Author

zepumph commented Oct 18, 2024

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 phetsims/chipper#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.

@zepumph
Copy link
Member Author

zepumph commented Nov 7, 2024

@zepumph
Copy link
Member Author

zepumph commented Nov 7, 2024

  • Bring the changes we make here back to dev meeting for a PSA. Probably the PSA is something like, "grunt tasks are for stable API that is public to all, scripts in perennial are probably the place for one-off experiments, helpful tasks, or dev-environment update processes. Chipper is only and solely for code responsible for building and running simulations."

zepumph added a commit that referenced this issue Nov 7, 2024
zepumph added a commit that referenced this issue Nov 7, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Nov 7, 2024
@zepumph
Copy link
Member Author

zepumph commented Nov 7, 2024

@samreid and I worked on this and there are 8 TODOs for this issue. Ready for the first person that get's to it.

@zepumph
Copy link
Member Author

zepumph commented Nov 7, 2024

Working on this now.

zepumph added a commit that referenced this issue Nov 7, 2024
zepumph added a commit that referenced this issue Nov 7, 2024
zepumph added a commit that referenced this issue Nov 7, 2024
zepumph added a commit that referenced this issue Nov 7, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Nov 7, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Nov 7, 2024
zepumph added a commit that referenced this issue Nov 7, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Nov 7, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Nov 7, 2024
@zepumph
Copy link
Member Author

zepumph commented Nov 7, 2024

One more TODO, then work on phetsims/chipper#1461, then a PSA at dev meeting next week.

@zepumph zepumph self-assigned this Nov 7, 2024
zepumph added a commit that referenced this issue Nov 8, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Nov 8, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Nov 8, 2024
@zepumph
Copy link
Member Author

zepumph commented Nov 8, 2024

I added a PSA to next dev meeting.

@zepumph zepumph removed their assignment Nov 8, 2024
@zepumph zepumph closed this as completed Nov 8, 2024
@zepumph zepumph reopened this Nov 8, 2024
@zepumph zepumph closed this as completed Nov 8, 2024
@zepumph zepumph reopened this Nov 8, 2024
@samreid samreid self-assigned this Nov 8, 2024
@zepumph
Copy link
Member Author

zepumph commented Nov 14, 2024

PSA Complete.

@zepumph zepumph closed this as completed Nov 14, 2024
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

3 participants