deprecated functions and fragile pattern-matching warnings
andyli opened this issue · 1 comments
There are a bunch of warnings, mostly about usages of deprecated functions and fragile pattern-matchings. Would be nice to have them fixed.
compilation log
./bootstrap
4.05.0
Using compat402.ml
COMPILING compat
COMPILING fugue
COMPILING filepath
COMPILING filesystem
BUILDING library Ext.cmo
COMPILING types
COMPILING gconf
COMPILING filetype
COMPILING dag
COMPILING libname
COMPILING pp
File "pp.ml", line 13, characters 26-42:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
COMPILING expr
File "expr.ml", line 129, characters 20-119:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(::::::|[])
File "expr.ml", line 132, characters 23-134:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(::::::|[])
COMPILING utils
COMPILING modname
File "modname.ml", line 22, characters 12-26:
Warning 3: deprecated: Char.uppercase
Use Char.uppercase_ascii instead.
File "modname.ml", line 27, characters 15-34:
Warning 3: deprecated: String.uncapitalize
Use String.uncapitalize_ascii instead.
File "modname.ml", line 28, characters 27-46:
Warning 3: deprecated: String.uncapitalize
Use String.uncapitalize_ascii instead.
File "modname.ml", line 47, characters 34-51:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
File "modname.ml", line 49, characters 12-29:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
COMPILING taskdep
COMPILING helper
COMPILING dagutils
COMPILING process
COMPILING findlibConf
COMPILING scheduler
COMPILING prog
COMPILING dependencies
COMPILING generators
COMPILING hier
File "hier.ml", line 88, characters 15-34:
Warning 3: deprecated: String.uncapitalize
Use String.uncapitalize_ascii instead.
File "hier.ml", line 194, characters 28-45:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
COMPILING meta
COMPILING metacache
COMPILING target
COMPILING dist
COMPILING project
File "project.ml", line 84, characters 8-24:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "project.ml", line 96, characters 53-70:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
File "project.ml", line 105, characters 10-26:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "project.ml", line 207, characters 15-31:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "project.ml", line 224, characters 13-29:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "project.ml", line 255, characters 17-33:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "project.ml", line 267, characters 13-29:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "project.ml", line 386, characters 13-29:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "project.ml", line 477, characters 15-31:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "project.ml", line 488, characters 14-30:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
COMPILING analyze
File "analyze.ml", line 110, characters 23-39:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
COMPILING configure
File "configure.ml", line 34, characters 57-73:
Warning 3: deprecated: String.uppercase
Use String.uppercase_ascii instead.
COMPILING prepare
File "prepare.ml", line 379, characters 10-113:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
DirectoryEntry _
COMPILING buildprogs
COMPILING build
COMPILING exception
BUILDING library Obuild.cmo
COMPILING sdist
COMPILING doc
COMPILING init
File "init.ml", line 98, characters 45-62:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
COMPILING help
COMPILING install
COMPILING path_generated
COMPILING main
LINKING obuild.bootstrap
Configuring obuild-0.1.9...
[ 1 of 57] Compiling Ext.Compat
[ 2 of 57] Compiling Ext.Fugue
[ 3 of 57] Intfing Ext.Filepath
[ 4 of 57] Compiling Ext.Filepath
[ 5 of 57] Intfing Ext.Filesystem
[ 6 of 57] Compiling Ext.Filesystem
File "ext/filesystem.ml", line 18, characters 11-216:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Unix.file_kind.
[ 7 of 57] Packing Ext
[ 8 of 57] Linking library dist/build/lib-obuild.ext/obuild_ext.cmxa
[ 8 of 57] Linking library dist/build/lib-obuild.ext/obuild_ext.cmxs
[ 8 of 57] Linking library dist/build/lib-obuild.ext/obuild_ext.cma
[ 9 of 57] Checking dist/build/lib-obuild.ext
[10 of 57] Compiling Obuild.Filetype
[11 of 57] Compiling Obuild.Gconf
[12 of 57] Compiling Obuild.Pp
[13 of 57] Compiling Obuild.Dag
File "obuild/pp.ml", line 13, characters 26-42:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
[14 of 57] Compiling Obuild.Expr
[15 of 57] Compiling Obuild.Modname
File "obuild/modname.ml", line 22, characters 12-26:
Warning 3: deprecated: Char.uppercase
Use Char.uppercase_ascii instead.
File "obuild/modname.ml", line 27, characters 15-34:
Warning 3: deprecated: String.uncapitalize
Use String.uncapitalize_ascii instead.
File "obuild/modname.ml", line 28, characters 27-46:
Warning 3: deprecated: String.uncapitalize
Use String.uncapitalize_ascii instead.
File "obuild/modname.ml", line 47, characters 34-51:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
File "obuild/modname.ml", line 49, characters 12-29:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
[16 of 57] Compiling Obuild.Types
File "obuild/expr.ml", line 129, characters 20-119:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(::::::|[])
File "obuild/expr.ml", line 132, characters 23-134:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(::::::|[])
File "obuild/expr.ml", line 216, characters 8-232:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Token.t.
File "obuild/expr.ml", line 209, characters 4-849:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Token.t.
File "obuild/expr.ml", line 233, characters 4-205:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Token.t.
File "obuild/expr.ml", line 268, characters 2-232:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Token.t.
[17 of 57] Compiling Obuild.Taskdep
[18 of 57] Compiling Obuild.Libname
[19 of 57] Compiling Obuild.Utils
[20 of 57] Compiling Obuild.Dagutils
[21 of 57] Compiling Obuild.Helper
[22 of 57] Compiling Obuild.Process
File "obuild/process.ml", line 95, characters 2-193:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Unix.process_status.
[23 of 57] Compiling Obuild.Scheduler
[24 of 57] Compiling Obuild.FindlibConf
[25 of 57] Compiling Obuild.Prog
[26 of 57] Compiling Obuild.Meta
[27 of 57] Compiling Obuild.Generators
File "obuild/generators.ml", line 55, characters 10-101:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Filetype.t.
[28 of 57] Compiling Obuild.Dependencies
[29 of 57] Compiling Obuild.Hier
File "obuild/meta.ml", line 129, characters 27-155:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Predicate.t.
File "obuild/meta.ml", line 139, characters 29-147:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Predicate.t.
File "obuild/meta.ml", line 315, characters 28-300:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 324, characters 48-235:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 330, characters 48-251:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 321, characters 40-683:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 347, characters 8-454:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 361, characters 8-243:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 370, characters 8-411:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 382, characters 8-410:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 394, characters 8-190:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 401, characters 8-242:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 410, characters 26-158:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 415, characters 8-144:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 421, characters 8-251:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 337, characters 31-4646:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
File "obuild/meta.ml", line 5, characters 0-11:
Warning 33: unused open Helper.
File "obuild/meta.ml", line 6, characters 0-10:
Warning 33: unused open Gconf.
[30 of 57] Compiling Obuild.Metacache
File "obuild/metacache.ml", line 1, characters 0-9:
Warning 33: unused open Meta.
File "obuild/hier.ml", line 88, characters 15-34:
Warning 3: deprecated: String.uncapitalize
Use String.uncapitalize_ascii instead.
File "obuild/hier.ml", line 194, characters 28-45:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
File "obuild/hier.ml", line 3, characters 0-10:
Warning 33: unused open Types.
[31 of 57] Compiling Obuild.Target
[32 of 57] Compiling Obuild.Project
[33 of 57] Compiling Obuild.Dist
File "obuild/project.ml", line 84, characters 8-24:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "obuild/project.ml", line 96, characters 53-70:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
File "obuild/project.ml", line 105, characters 10-26:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "obuild/project.ml", line 207, characters 15-31:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "obuild/project.ml", line 224, characters 13-29:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "obuild/project.ml", line 255, characters 17-33:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "obuild/project.ml", line 267, characters 13-29:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "obuild/project.ml", line 386, characters 13-29:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "obuild/project.ml", line 477, characters 15-31:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "obuild/project.ml", line 488, characters 14-30:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
[34 of 57] Compiling Obuild.Analyze
File "obuild/analyze.ml", line 59, characters 8-94:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Target.Name.t.
File "obuild/analyze.ml", line 110, characters 23-39:
Warning 3: deprecated: String.lowercase
Use String.lowercase_ascii instead.
File "obuild/analyze.ml", line 184, characters 22-466:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Meta.Predicate.t.
File "obuild/analyze.ml", line 208, characters 10-182:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Target.Name.t.
[35 of 57] Compiling Obuild.Configure
[36 of 57] Compiling Obuild.Prepare
File "obuild/configure.ml", line 34, characters 57-73:
Warning 3: deprecated: String.uppercase
Use String.uppercase_ascii instead.
File "obuild/prepare.ml", line 168, characters 8-93:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Analyze.dependency_tag.
File "obuild/prepare.ml", line 218, characters 17-557:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Filetype.t.
File "obuild/prepare.ml", line 379, characters 10-113:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
DirectoryEntry _
File "obuild/prepare.ml", line 489, characters 10-224:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type compile_step.
File "obuild/prepare.ml", line 552, characters 6-99:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Analyze.dep_type.
File "obuild/prepare.ml", line 202, characters 9-16:
Warning 27: unused variable srcPath.
File "obuild/prepare.ml", line 233, characters 13-20:
Warning 27: unused variable srcPath.
File "obuild/prepare.ml", line 239, characters 37-41:
Warning 27: unused variable path.
[37 of 57] Compiling Obuild.Buildprogs
File "obuild/buildprogs.ml", line 69, characters 14-206:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Filetype.t.
File "obuild/buildprogs.ml", line 66, characters 17-23:
Warning 27: unused variable srcDir.
[38 of 57] Compiling Obuild.Build
File "obuild/build.ml", line 60, characters 45-688:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Filetype.t.
File "obuild/build.ml", line 59, characters 4-1138:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Filetype.t.
File "obuild/build.ml", line 89, characters 6-63:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Types.ocaml_compiled_type.
File "obuild/build.ml", line 89, characters 6-63:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Types.ocaml_compilation_option.
File "obuild/build.ml", line 150, characters 20-196:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Hier.file_entry.
File "obuild/build.ml", line 349, characters 22-124:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Types.ocaml_compilation_option.
File "obuild/build.ml", line 360, characters 13-458:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Target.Name.t.
File "obuild/build.ml", line 481, characters 40-160:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Prepare.compile_step.
[39 of 57] Compiling Obuild.Exception
[40 of 57] Packing Obuild
[41 of 57] Linking library dist/build/lib-obuild/obuild.cmxa
[41 of 57] Linking library dist/build/lib-obuild/obuild.cmxs
[41 of 57] Linking library dist/build/lib-obuild/obuild.cma
[42 of 57] Checking dist/build/lib-obuild
[43 of 57] Compiling Assimilate_oasis
[44 of 57] Compiling Simple
[45 of 57] Compiling Install
File "src/install.ml", line 21, characters 6-264:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Obuild.Filetype.t.
File "src/install.ml", line 27, characters 4-116:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Obuild.Filetype.t.
File "src/install.ml", line 43, characters 31-137:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Obuild.Target.Name.t.
File "src/install.ml", line 47, characters 31-137:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Obuild.Target.Name.t.
[46 of 57] Compiling Doc
[47 of 57] Compiling Sdist
File "src/doc.ml", line 15, characters 8-16:
Warning 27: unused variable projFile.
[48 of 57] Compiling Help
[49 of 57] Compiling Path_generated
[50 of 57] Compiling Init
File "src/sdist.ml", line 28, characters 14-178:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Obuild.Filetype.t.
File "src/sdist.ml", line 36, characters 12-154:
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type Obuild.Filetype.t.
File "src/sdist.ml", line 9, characters 17-27:
Warning 27: unused variable isSnapshot.
[51 of 57] Linking executable dist/build/obuild-from-oasis/obuild-from-oasis
File "src/init.ml", line 98, characters 45-62:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
[52 of 57] Linking executable dist/build/obuild-simple/obuild-simple
[53 of 57] Compiling Main
[54 of 57] Checking dist/build/obuild-from-oasis
[55 of 57] Checking dist/build/obuild-simple
[56 of 57] Linking executable dist/build/obuild/obuild
[57 of 57] Checking dist/build/obuild
real 0m3.074s
user 0m2.820s
sys 0m0.888s
the problem with deprecated things is that obuild is supposed to compile with even very old versions of ocaml.
I guess that for unused variables, a PR would be easily accepted.