Skip to content

Commit ee5e65e

Browse files
committed
fix #1559
1 parent 3216b42 commit ee5e65e

29 files changed

+349
-226
lines changed

jscomp/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ CORE_SRCS= js_runtime_modules \
295295
js_dump_property\
296296
js_dump_import_export\
297297
js_dump \
298+
js_name_of_module_id\
298299
js_dump_program \
299300
js_pass_debug\
300301
js_of_lam_option js_output lam_compile_global \

jscomp/all.depend

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ core/js_dump_string.cmi : ext/ext_pp.cmi
345345
core/js_dump_property.cmi : ext/ext_pp.cmi
346346
core/js_dump_import_export.cmi : ext/ext_pp_scope.cmi ext/ext_pp.cmi
347347
core/js_dump.cmi : core/j.cmx ext/ext_pp_scope.cmi ext/ext_pp.cmi
348+
core/js_name_of_module_id.cmi : core/lam_module_ident.cmi \
349+
core/js_packages_info.cmi
348350
core/js_dump_program.cmi : core/js_packages_info.cmi core/j.cmx \
349351
ext/ext_pp.cmi
350352
core/js_pass_debug.cmi : core/j.cmx
@@ -538,9 +540,12 @@ core/js_dump.cmx : core/js_stmt_make.cmx core/js_runtime_modules.cmx \
538540
core/js_dump_lit.cmx core/js_dump_import_export.cmx core/js_closure.cmx \
539541
core/j.cmx ext/ident_set.cmx ext/ext_pp_scope.cmx ext/ext_pp.cmx \
540542
ext/ext_list.cmx ext/ext_ident.cmx core/js_dump.cmi
543+
core/js_name_of_module_id.cmx : core/lam_compile_env.cmx \
544+
core/js_packages_state.cmx core/js_packages_info.cmx \
545+
core/js_name_of_module_id.cmi
541546
core/js_dump_program.cmx : core/lam_module_ident.cmx \
542-
core/lam_compile_env.cmx core/js_packages_state.cmx \
543-
core/js_packages_info.cmx core/js_dump_string.cmx core/js_dump_lit.cmx \
547+
core/js_packages_info.cmx core/js_name_of_module_id.cmx \
548+
core/js_dump_string.cmx core/js_dump_lit.cmx \
544549
core/js_dump_import_export.cmx core/js_dump.cmx common/js_config.cmx \
545550
core/j.cmx ext/ext_pp_scope.cmx ext/ext_pp.cmx common/bs_version.cmx \
546551
core/js_dump_program.cmi

jscomp/bin/all_ounit_tests.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11251,10 +11251,7 @@ module Ext_path : sig
1125111251
* along with this program; if not, write to the Free Software
1125211252
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
1125311253

11254-
11255-
type t =
11256-
| File of string
11257-
| Dir of string
11254+
type t
1125811255

1125911256

1126011257

@@ -11406,8 +11403,11 @@ let node_concat ~dir base =
1140611403
dir ^ Literals.node_sep ^ base
1140711404

1140811405
let node_rebase_file ~from ~to_ file =
11406+
1140911407
node_concat
11410-
~dir:(node_relative_path ~from:(Dir from) (Dir to_))
11408+
~dir:(
11409+
if from = to_ then Literals.node_current
11410+
else node_relative_path ~from:(Dir from) (Dir to_))
1141111411
file
1141211412

1141311413

jscomp/bin/bsb.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4741,10 +4741,7 @@ module Ext_path : sig
47414741
* along with this program; if not, write to the Free Software
47424742
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
47434743

4744-
4745-
type t =
4746-
| File of string
4747-
| Dir of string
4744+
type t
47484745

47494746

47504747

@@ -4896,8 +4893,11 @@ let node_concat ~dir base =
48964893
dir ^ Literals.node_sep ^ base
48974894

48984895
let node_rebase_file ~from ~to_ file =
4896+
48994897
node_concat
4900-
~dir:(node_relative_path ~from:(Dir from) (Dir to_))
4898+
~dir:(
4899+
if from = to_ then Literals.node_current
4900+
else node_relative_path ~from:(Dir from) (Dir to_))
49014901
file
49024902

49034903

jscomp/bin/bsb_helper.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,10 +1314,7 @@ module Ext_path : sig
13141314
* along with this program; if not, write to the Free Software
13151315
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
13161316

1317-
1318-
type t =
1319-
| File of string
1320-
| Dir of string
1317+
type t
13211318

13221319

13231320

@@ -1469,8 +1466,11 @@ let node_concat ~dir base =
14691466
dir ^ Literals.node_sep ^ base
14701467

14711468
let node_rebase_file ~from ~to_ file =
1469+
14721470
node_concat
1473-
~dir:(node_relative_path ~from:(Dir from) (Dir to_))
1471+
~dir:(
1472+
if from = to_ then Literals.node_current
1473+
else node_relative_path ~from:(Dir from) (Dir to_))
14741474
file
14751475

14761476

jscomp/bin/whole_compiler.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ bin/whole_compiler.ml : ../vendor/ocaml/typing/cmt_format.mli
407407
bin/whole_compiler.ml : ../vendor/ocaml/typing/includecore.ml
408408
bin/whole_compiler.ml : ../vendor/ocaml/typing/includemod.mli
409409
bin/whole_compiler.ml : ../vendor/ocaml/typing/printtyped.mli
410+
bin/whole_compiler.ml : core/js_name_of_module_id.ml
410411
bin/whole_compiler.ml : core/js_of_lam_exception.mli
411412
bin/whole_compiler.ml : core/lam_beta_reduce_util.ml
412413
bin/whole_compiler.ml : core/ocaml_batch_compile.mli
@@ -421,6 +422,7 @@ bin/whole_compiler.ml : ../vendor/ocaml/typing/includecore.mli
421422
bin/whole_compiler.ml : ../vendor/ocaml/typing/outcometree.mli
422423
bin/whole_compiler.ml : ../vendor/ocaml/typing/typedtreeMap.ml
423424
bin/whole_compiler.ml : core/js_dump_import_export.ml
425+
bin/whole_compiler.ml : core/js_name_of_module_id.mli
424426
bin/whole_compiler.ml : core/lam_beta_reduce_util.mli
425427
bin/whole_compiler.ml : core/lam_compile_primitive.ml
426428
bin/whole_compiler.ml : core/lam_pass_deep_flatten.ml

0 commit comments

Comments
 (0)