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

Extensions versioning #3270

Merged
merged 25 commits into from
Mar 24, 2020
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c07cbd8
Add tests
voodoos Mar 11, 2020
6e89fdb
Implement new versioning method
voodoos Mar 11, 2020
260174e
Switch `menhir` to new system and fix the tests
voodoos Mar 12, 2020
5438b43
Move cinaps to new versionning
voodoos Mar 16, 2020
055eae4
Move action_plugin to new versioning
voodoos Mar 16, 2020
6422b69
move fmmt to new versioning. Update now failing tests
voodoos Mar 16, 2020
6097372
Move mdx to new versioning and correct tests
voodoos Mar 16, 2020
6d03bcf
Move coq and bootstrap to new versioning
voodoos Mar 16, 2020
e5f239e
Move library_variants to new versioning and correct the tests
voodoos Mar 16, 2020
2fa957f
Move building_ocaml_compiler to new versioning and correct test
voodoos Mar 16, 2020
c8e5403
Remove support for old versioning system
voodoos Mar 16, 2020
287e790
doc
jeremiedimino Mar 17, 2020
2db337d
More explicit labeled arguments
voodoos Mar 17, 2020
d34b43a
Clearer folding on `versions` in `make`
voodoos Mar 17, 2020
325decd
Better error messages
voodoos Mar 17, 2020
f628537
Use `Option.some_if`
voodoos Mar 17, 2020
62fdc3c
Add a comment in supperted_ranges
jeremiedimino Mar 17, 2020
6c8fac5
Warning if <=2.5
voodoos Mar 17, 2020
2189684
Bump version number to 2.5
voodoos Mar 17, 2020
c94b4d2
Add test and todo related to 2.5
voodoos Mar 17, 2020
b27c28a
Correct coq's tests
voodoos Mar 17, 2020
f93a0a2
Make use of warnings is_error label
voodoos Mar 17, 2020
5f9e8ae
Merge branch 'master' into extensions-versionning
voodoos Mar 24, 2020
d1ecb37
Change CHANGES
voodoos Mar 24, 2020
0508d3c
Merge branch 'extensions-versionning' of github.com:voodoos/dune into…
voodoos Mar 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Warning if <=2.5
Signed-off-by: Ulysse Gérard <thevoodoos@gmail.com>
voodoos committed Mar 17, 2020
commit 6c8fac589878316e53d073f985f9edce19416723
7 changes: 6 additions & 1 deletion src/dune_lang/syntax.ml
Original file line number Diff line number Diff line change
@@ -215,7 +215,7 @@ let check_supported ~dune_lang_ver t (loc, ver) =
Pp.textf "Supported versions of this extension in %s:" )
(dune_ver_text dune_lang_ver)
in
User_error.raise ~loc
let message =
[ Pp.textf "Version %s of %s is not supported%s." (Version.to_string ver)
t.desc until
; supported
@@ -226,6 +226,11 @@ let check_supported ~dune_lang_ver t (loc, ver) =
else
Pp.textf "%s to %s" (Version.to_string a) (Version.to_string b))
]
in
if (not (String.is_empty until)) && dune_lang_ver < (2, 5) then
User_warning.emit ~loc message
else
User_error.raise ~loc message

let greatest_supported_version ?dune_lang_ver t =
Supported_versions.greatest_supported_version ?dune_lang_ver
5 changes: 2 additions & 3 deletions test/blackbox-tests/test-cases/extensions-versionning/run.t
Original file line number Diff line number Diff line change
@@ -4,11 +4,10 @@ Test that version of extensions is compatible with dune_lang version
File "dune-project", line 2, characters 14-17:
2 | (using menhir 2.0)
^^^
Error: Version 2.0 of the menhir extension is not supported until version 1.4
of the dune language.
Warning: Version 2.0 of the menhir extension is not supported until version
1.4 of the dune language.
Supported versions of this extension in version 1.2 of the dune language:
- 1.0
[1]

Using fields in dune-project should be generated according to
the maximum supported version for the chosen dune lang version