File tree 3 files changed +15
-7
lines changed
test/blackbox-tests/test-cases/dune-project-meta/main.t
3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 42
42
43
43
- Fix compilation of Dune under esy on Windows (#6109 , fixes #6098 , @nojb )
44
44
45
+ - Improve error message when parsing several licenses in ` (license) ` (#6114 ,
46
+ fixes #6103 , @emillon )
47
+
45
48
3.4.1 (26-07-2022)
46
49
------------------
47
50
Original file line number Diff line number Diff line change @@ -498,10 +498,14 @@ module Info = struct
498
498
(Dune_lang.Syntax. since Stanza. syntax (v (1 , 9 )) >>> repeat string )
499
499
and + license =
500
500
field_o " license"
501
- (Dune_lang.Syntax. since Stanza. syntax (v (3 , 2 ))
502
- >>> repeat1 string
503
- < |> ( Dune_lang.Syntax. since Stanza. syntax (v (1 , 9 )) >>> string
504
- >> | fun s -> [ s ] ))
501
+ (Dune_lang.Syntax. since Stanza. syntax (v (1 , 9 ))
502
+ >>> let * l = repeat1 string in
503
+ (if List. length l > 1 then
504
+ Dune_lang.Syntax. since ~what: " Parsing several licenses"
505
+ Stanza. syntax
506
+ (v (3 , 2 ))
507
+ else return () )
508
+ >>> return l)
505
509
and + homepage =
506
510
field_o " homepage"
507
511
(Dune_lang.Syntax. since Stanza. syntax (v (1 , 10 )) >>> string )
Original file line number Diff line number Diff line change @@ -606,10 +606,11 @@ Reject multiple licences in version [1.9, 3.2)
606
606
> EOF
607
607
608
608
$ dune build
609
- File " dune-project" , line 4 , characters 13 -16 :
609
+ File " dune-project" , line 4 , characters 0 -17 :
610
610
4 | (license MIT ISC)
611
- ^^ ^
612
- Error: Too many argument for license
611
+ ^^^^^^^^^^^^^^^^ ^
612
+ Error: Parsing several licenses is only available since version 3.2 of the
613
+ dune language. Please update your dune-project file to have (lang dune 3.2 ).
613
614
[1 ]
614
615
615
616
Allow multiple licences in version >= 3.2
You can’t perform that action at this time.
0 commit comments