Skip to content

Semantic Versioning #363

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

Closed
runvnc opened this issue Sep 19, 2015 · 10 comments
Closed

Semantic Versioning #363

runvnc opened this issue Sep 19, 2015 · 10 comments

Comments

@runvnc
Copy link

runvnc commented Sep 19, 2015

Will web assembly support semantic versioning for modules?

@jfbastien
Copy link
Member

Can you elaborate? Version numbers are discussed for dynamic linking, but semantic versioning means many things to many people, so I'm not sure what to answer :-)

@runvnc
Copy link
Author

runvnc commented Sep 21, 2015

As described here: http://semver.org/

@lukewagner
Copy link
Member

A major goal of the wasm binary format is to not require versioning (analogous to how a JS parser isn't versioned: new features translate to new cases in existing switch statements). See this overview for more details. We would, however, likely have a version word very early in the binary stream so that if we ever needed some major overhaul, we would have a place to bump the version, but the goal would be that this version would, like ELF, forever stay at 1.

@jfbastien
Copy link
Member

In fact, we want to encourage the usage of feature detection, and allow implementations to ship new features in any order they want. That means there's no linear versioning of wasm past MVP!

@sunfishcode
Copy link
Member

I expect the main desire for semver would be for use in dynamic libraries. As far as I know, the question of naming dynamic libraries has not been discussed yet. There are several aspects to naming: versioning, search paths, namespacing, and probably others.

@jfbastien
Copy link
Member

@sunfishcode we discussed numbering in the context of #53, especially in concert with SRI.

@sunfishcode sunfishcode added this to the Future Features milestone Oct 22, 2015
@runvnc
Copy link
Author

runvnc commented Oct 25, 2015

I just read this The End of Software Versions
The thing is, when you have a massive monolithic API like ZMQ or (the worst) "HTML5", version numbers cannot be useful.

Semantic versioning does make sense and (usually) works when your modules are all small, specific, and self-contained.

Since there is a single module version packaged in the browser for everything anyone could think of to put in the browser, a "Browser API" version number could not give any information about compatibility of specific sub-APIs and so is less than useful.

In the context of self-contained, decoupled web assembly modules with specific narrowly defined purposes, semantic versioning will be important. If we can't get those types of modules with web assembly in some context then we will be missing something important I believe.

So my suggestion is that at some point pull browser/HTML5 things apart into versioned modules so that we could

import AudioContext from 'audio';

and perhaps specify versions using some @1.x syntax or assembly metadata. Rather than relying on, hoping for certain features to be at certain stages of implementation and finding out at runtime.

@kg
Copy link
Contributor

kg commented Oct 26, 2015

@runvnc the approach you describe would require WebAssembly to externally enforce versioning on HTML5 APIs that aren't versioned. Furthermore, how does it work if you import v1.x of AudioContext in an environment that has v2.x if they made behavioural changes? They call HTML5 a 'Living Standard' for a reason. :(

@runvnc
Copy link
Author

runvnc commented Oct 27, 2015

@kg how does feature detection even work with web assembly, since its supposed to be compiled right, and wouldn't that mean that at compile time it would be checking types and function signatures etc. against a specific version or contract of AudioContext?

Maybe they really should be breaking the web platform down into a set of versioned, decoupled modules. Maybe the reason its not like that is because it is all ultimately based on a system (C++) that relies on monolithic applications and predates the existence of contemporary modules and the things that come with them like semantic versioning and registries.

@jfbastien
Copy link
Member

It seems like we're definitely doing feature detection.

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