ta0kira / zeolite

Zeolite is a statically-typed, general-purpose programming language.
Apache License 2.0
18 stars 0 forks source link

Add optional compiler version bounds to `.zeolite-module`. #71

Closed ta0kira closed 3 years ago

ta0kira commented 4 years ago

If done poorly, this could be a mess.

The purpose would be to fail fast when a module uses features that aren't supported. Because this could affect parsing, it should be done for the module as a whole and not on a per-file basis. If it's in the .zeolite-module, it should be at the very top and should cause parsing to terminate if there's a version mismatch.

Upper bounds probably aren't necessary; we don't need to go embedding a dependency-versioning system in the compiler.

Ideally, the features will level out soon and this won't be necessary, or just a min version will be supported.

A potential problem with this whole idea is that with compiler 0.n+1 installed, the user might not even be able to compile modules for 0.n due to possible breaking changes. So, it's almost a requirement that backward compatibility be maintained. Or, it's a requirement that old things be brought up to date.

Thus, the version would only be for language or module-system features that didn't exist prior to a specified version.

ta0kira commented 3 years ago

I'll reopen this if it turns out to be problematic.