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

Tag target CDM with semver expression #27

Open
chrisknoll opened this issue Jan 29, 2018 · 2 comments
Open

Tag target CDM with semver expression #27

chrisknoll opened this issue Jan 29, 2018 · 2 comments

Comments

@chrisknoll
Copy link
Collaborator

chrisknoll commented Jan 29, 2018

Feature request

As the CDM evolves, there may be instances where an circe expression is constructed that does not support a certain CDM capability. This feature request proposes to add a 'targetCDM' property that is a a semver range expression (example and documentation). Authors can declare which version of a CDM this expression applies to. Using this, a validation check can be made before execution that the expression is compatible with the CDM version.

examples:

cdmTarget: '>5.0.1'
cdmTarget:'5.0.1 || >=5.3 < 6.0'

In javascript, this expression could be evaluated using:

semver.satisfies(cdmVersion, cdmTarget) // true when the cdmVersion fits in the cdmTarget semver range
@pavgra
Copy link
Contributor

pavgra commented Jan 30, 2018

@chrisknoll, this looks very reasonable for me and should resolve compatibility uncertainty problem. The only question to answer is: who is going to fill the field? I guess, it should be done automatically based on chosen expression params

@chrisknoll
Copy link
Collaborator Author

I was thinking that the author of the expression would have to declare the intended cdm version. I don't think you can do it on parameters alone: the semantic meaning of parameters (such as what is happening with visits and visit-details) may change between versions in a way that isn't structural, but more conventions might change. This is similar to declaring a depenency on a NPM library. The author of the npm package declares the suitable dependent libraries that can be used...it's not like you can automatically detect the dependent library version...

To assist the user selection, I was going to provide a UI component that will parse the semver range for validity and allow them to check their expression against a speciic cdm version value to confirm it is working as they expect.

-Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants