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

clean up version identifier #411

Closed
pixelzoom opened this issue Mar 9, 2017 · 14 comments
Closed

clean up version identifier #411

pixelzoom opened this issue Mar 9, 2017 · 14 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Mar 9, 2017

This issue was identified while working on #406.

PhET's version identifier has the following general problems:

• No complete specification of format and semantics (probably belongs in SimVersion).
• Multiple incomplete specifications (SimVersion, getVersionForBrand)
• Multiple ways to get the version identifier (require('JOIST/packageJSON'), phet.joist.sim.version, phet.chipper.version, SimVersion, others?)
• Multiple representation of the version identifier ({string}, {SimVersion}, others?)
• Multiple places where the version identifier is being read from package.json (Sim, UpdateCheck)
• Brand names that don't match the name used in the metadata (e.g. "phet-io" and "phetio")
• No access by sims unless they violate visibility annotations (see phetsims/arithmetic#179, phetsims/molecule-shapes#147, phetsims/neuron#134)
• Sim code that does its own parsing of version identifiers (e.g phetsims/arithmetic#179)

PhET needs encapsulation of the version identifier (and its specification) in one representation, available to sims, without the need for sims to parse the identifier as a string.

@jonathanolson's intent may have been to address some of these issues by creating SimVersion. But he didn't replace any of the other representations, and SimVersion is used only by UpdateCheck (the feature that checks for sim updates).

Imo, this is high priority. Assigning to @ariel-phet to reprioritize and assign. Labeled for discussion at developer meeting.

@jonathanolson
Copy link
Contributor

Also, ideally the logic for versions could be shared with yotta/build-server/etc.

@samreid
Copy link
Member

samreid commented Mar 9, 2017

@ariel-phet recommended @jonathanolson take the lead and @samreid consult with respect to phet-io issues.

@pixelzoom
Copy link
Contributor Author

@mattpen said that if build-server changes, it could also affect the website.

@samreid
Copy link
Member

samreid commented Jul 24, 2017

Unassigning myself, @jonathanolson let me know if/when I can help out.

@samreid samreid removed their assignment Jul 24, 2017
@jonathanolson
Copy link
Contributor

Have we switched versioning schemes recently, as part of phetsims/chipper#560 or other issues?

As this code will need to be used by perennial, presumably it will need to handle all versions of our version strings (presumably it will need to be somewhat lax with parsing in versions).

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jul 26, 2017

My recollection is that we reached no consensus on version id syntax (in phetsims/chipper#560), agreed to live with the current warts imposed by PhET-iO (e.g. "1.0.0-phetiorc.1"), and decided to kick the can down the road until we work on new build tools/process to support PhET-iO. Before we can do that, we need to discuss high-level PhET-iO issues; in https://github.com/phetsims/phet-io/issues/1137#issuecomment-317140954, @kathy-phet said that discussion of those issues will resume "in early August". @ariel-phet said we should plan to spend time on build tools/process in October.

@jonathanolson
Copy link
Contributor

@ariel-phet, I'd prefer to delay this work until we do the build tools/process stuff, as it hits build-server/chipper/maintenance-releases/yotta/sims/etc. Is that fine?

@ariel-phet
Copy link

@jonathanolson yes that should be fine.

Related to phetsims/chipper#586

@zepumph
Copy link
Member

zepumph commented Oct 12, 2017

This is a key part of chipper:2.0, we should discuss fully when @pixelzoom and @kathy-phet are present as well.

Things like phet-io studies, potentially other phet-io brands, will play into this.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jan 25, 2018

As part of chipper 2.0, version id schema was finalized and implement in phetsims/chipper#636 and phetsims/chipper#560, see SimVersion.js. Labeling for developer meeting to see what else needs to be done to address this issue.

I'm interested in seeing this resolved mainly so that I can address #406 (disable "show answers" in production versions) for several of the sims that I'm responsible for. And we can't currently identify whether a sim is a production version at runtime.

@jonathanolson
Copy link
Contributor

I'll consolidate sim-side logic into SimVersion, including the "is this running from production" checks.

@zepumph
Copy link
Member

zepumph commented Sep 13, 2018

@jonathanolson it looks like this was completed, as SimVersion is looking pretty good. Please close if correct. I think that the rest will be covered by phetsims/perennial#111

@jonathanolson
Copy link
Contributor

It looks like there are still other cases of direct package.json usage (Sim.js), so I'm not sure the issue is completely handled.

@jonathanolson
Copy link
Contributor

Scanned joist, and this is looking good. Closing.

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

5 participants