-
Notifications
You must be signed in to change notification settings - Fork 14
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
version id scheme #560
Comments
Prior discussion about how to name the versions is in https://github.com/phetsims/phet-io/issues/623 and it is codified in chipper/js/getVersionForBrand.js |
The current scheme of inserting "phetio" in front of "dev" and "rc" in the version identifier breaks the detection scheme that we approved in phetsims/joist#406 (comment). One of the hazards of not having a well-defined syntax for version id. |
For a summary of other problems with the current version id scheme, see phetsims/joist#411 (clean up version identifier). |
Here's another possible general form that is closer to what we have now. The
E.g.: 1.0.0 This would probably require fewer changes to the build process. But imo it's preferable to put the |
It appears that the semantic versioning rules (which we looked at previously) does support hyphens in pre-release version identifiers. http://semver.org/#spec-item-9 . However, I'm not sure that we should be using "pre-release" style to identify production versions like "1.0.0-phetio". |
Brainstorming: what if instead of changing the version name for phet-io sims, we change the project name. Proposed: This idea was prompted by on the semantic versioning link above. |
They are not different applications. They are the same application with different branding and different features enabled. |
They also have different code (phet-io sim versions include phetio.js internally and wrappers externally). UPDATE: "phet-io": {
"preload": [
"../sherpa/lib/jsondiffpatch-0.1.31.js",
"../phet-io/js/phetio-query-parameters.js"
],
"phetLibs": [
"phet-io",
"phet-io-website"
]
} |
So... phetio is phet with additional features (and code for those features) added, right? |
Correct, there is added code and different brand metadata. |
Would it be simpler from an engineering standpoint if we only had one file (which supports both phet and phet-io)? If so, we would need @kathy-phet to approve this before moving forward. The PhET-iO version contains all of the dependencies.json for everything. This is parallel to the conversation we had earlier about bundling all of the translations into a single file. Maybe bundling all of the "brands" into a single file would provide the same benefits. CURRENT STATUS: Let's sleep on it and discuss at an upcoming developer meeting. UPDATE: The PhET and PhET-iO simulations have very different licensing, so likely cannot be combined into a single file. |
We are discussing making phet-io development part of the normal process and unifying the version numbers (and branch names) and having the build process build both artifacts. |
Hence we would take the brand out of the version identifier and branch names. @jonathanolson and @zepumph and @samreid will work together to investigate how to make this happen. |
As part of #567 we will investigate removing brand from version and branch. |
Tagging for dev meeting tomorrow. |
Previously, @kathy-phet has expressed a strong preference for keeping the hyphen where PhET-iO appears in URLs, filenames and other user-visible locations. |
So by that we should probably have:
|
Also noting:
|
12/7/17 revisions to #560 (comment) based on decision in #560 (comment): local and dev directory structure (assuming
PhET production directory structure
PhET-iO production directory structure
|
12/7/17 dev meeting notes, changes reflected in #560 (comment): • Allow dashes in brand name |
Discussed with @jonathanolson. We think that the build-server should fail and return an error if |
Implemented in the build and dev deploy. Will be waiting on the build-server request format and support for rc/production deploys. See https://www.colorado.edu/physics/phet/dev/html/chains/1.7.0-dev.20 as an example. |
The commits above should make phet-io wrappers work for the updated version id schema. |
The build-server requests now accomodate the new version and filename scheme. @pixelzoom @jonathanolson @samreid - is it ok to close this issue? Should we create documentation first? |
I don't know. What kind of documentation are you thinking of? |
Documentation (maybe in a perennial doc/*.md) about versioning is probably recommended. |
Can someone please summarize (in this issue) the format of the version id scheme that was actually implemented? |
Notes in SimVersion.js:
|
Closing, since this versioning has been fully implemented. If anyone needs anything else, please re-open. |
The version id for PhET sims has (imo) gotten a bit confused with the introduction of PhET-iO. The 'phetio' brand identifier has been tacked on in a non-general way, and I have yet to see anyone provide a coherent/comprehensive description of the version id's syntax and semantics (
getVersionForBrand.js
included).Current version id scheme
Here is the current format for public, dev and RC versions respectively, when brand is 'phet':
1.1.0
1.1.0-dev.1
1.1.0-rc.1
So far, so good. Now here is the current format when brand is 'phetio':
1.1.0-phetio
1.1.0-phetiodev.1
1.1.0-phetiorc.1
In the public version case, the build process adds a '-phetio' prefix. In the dev and RC cases, the build process reads the version id from package.json and replaces 'dev' and 'rc' with 'phetiodev' and 'phetiorc' respectively.
A few problems with this scheme:
(1) It modifies what the developer puts in package.json.
(2) It modifies test and public versions differently.
(3) It combines the "test type" and "brand" info, making it more difficult to parse.
(4) It is not general enough to support future test types or brands.
(5) It's difficult to write a "general form" description.
I'm proposing that we revised the version id scheme, as described below.
Proposed version id scheme
The version id scheme will consists of 3 chunks:
number[-test][-brand]
where:
•
number
describes the version number•
test
describes the test (absence indicates a public version that has been QA tested)•
brand
describes the brand (absence indicates 'phet' brand)• square brackets indicate an optional chunk
• hypen is the separator between chunks
Expanding the chunks, we have:
major.minor.maintenance[-testType.testNumber][-brandName]
where:
•
major
= major number, sequential integer•
minor
= minor number, sequential integer, resets to 0 whenmajor
is changed•
maintenance
= maintenance number, sequential integer, resets to 0 whenminor
is changed•
typeType
= the type of test, currently 'dev' or 'rc'•
testNumber
= sequential integer indicating the test number•
brandName
= the brand name, e.g. 'phetio'. Absence indicates 'phet' brand.The developer specifies the
number[-test]
portion of the version identifier in package.json. The build process add the[-brandName]
portion, if applicable, to each supported brand that is built.Examples:
1.5.0 = public version of 'phet' brand
1.5.0-phetio = public version of 'phetio' brand
1.5.0-x = public version of brand 'x', where 'x' is a client or some future brand
1.5.0-dev.1 = dev test for 'phet' brand
1.5.0-dev.1-phetio = dev test for 'phetio' brand
1.5.0-dev.1-x = dev test for brand 'x'
1.5.0-rc.1 = RC test for 'phet' brand
1.5.0-rc.1-phetio = RC test for 'phetio' brand
1.5.0-rc.1-x = RC test for brand 'x'
Another advantage of this scheme will become apparent if/when we publish all supported brands for a sim simultaneously. We would want all related files to live in the same directory, with version ids that are clearly similar. For example, for a sim with supported brands 'phet', 'phetio' and 'x':
public versions, all located in 1.0.0/ directory:
1.0.0
1.0.0-phetio
1.0.0-x
dev versions, all located in 1.0.0-dev.15/ directory:
1.0.0-dev.15
1.0.0-dev.15-phetio
1.0.0-dev.15-x
RC version, all located in 1.0.0-rc.1/ directory:
1.0.0-rc.1
1.0.0-rc.1-phetio
1.0.0-rc.1-x
Labeling for discussion at developer meeting.
EDIT (@samreid): fixed a typo
The text was updated successfully, but these errors were encountered: