MLstate / opalang

The Opa Language for Web Application Development
http://opalang.org
Other
1.24k stars 125 forks source link

Doesn't build under OCaml 4.02.1 #169

Closed izderadicka closed 9 years ago

izderadicka commented 9 years ago
+ /usr/bin/ocamlc.opt -c -g -warn-error A -w L -w Z -I ocamllib/libbase -I tools -I ocamllib -I lib -I compiler -I tools/build -o ocamllib/libbase/uchar.cmo ocamllib/libbase/uchar.ml
File "ocamllib/libbase/uchar.ml", line 64, characters 11-23:
Warning 3: deprecated: Array.create
Use Array.make instead.
File "ocamllib/libbase/uchar.ml", line 94, characters 10-23:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "ocamllib/libbase/uchar.ml", line 99, characters 42-59:
Warning 3: deprecated: String.set
Use Bytes.set instead.
File "ocamllib/libbase/uchar.ml", line 1:
Error: Some fatal warnings were triggered (3 occurrences)
Command exited with code 2.
Compilation unsuccessful after building 256 targets (0 cached) in 00:00:07.

Clearly problem is with warnings to be taken as errors.

Following changes helped me to compile :

$ git diff
diff --git a/_tags b/_tags
index 5d8d922..340c3c4 100644
--- a/_tags
+++ b/_tags
@@ -15,4 +15,4 @@
 <{ocamllib,compiler,lib,tools}>: include

 # Warnings
-<**/*.ml>: warn_L, warn_Z, warn_error_A
+<**/*.ml>: warn_L, warn_Z, warn_error_A-3
diff --git a/compiler/passes/_tags b/compiler/passes/_tags
index 5cfd931..5ead5ea 100644
--- a/compiler/passes/_tags
+++ b/compiler/passes/_tags
@@ -1,7 +1,7 @@
 # -*- conf -*- (for emacs)

 # preprocessing
-true: with_mlstate_debug, warn_A, warn_e, warn_error_A
+true: with_mlstate_debug, warn_A, warn_e, warn_error_A-48

 <**/*.{ml,mli}>: use_libbase, use_libqmlcompil, use_passlib, use_opalang, use_compilerlib, use_opacapi
 <surfaceAst*.{ml,mli}>: use_opalib, use_libbsl

There are basically deprecated warnings (quite common due to changes in String module) and one new warning no. 48 introduced in 4.02 - details about this warning are here

hbbio commented 9 years ago

Fixed with f6cf97175ddc9ed5cf6ca8dee41507c4af448459