@@ -38,47 +38,44 @@ node ./packages/main/src/Main.mjs > ./packages/main/src/output.txt
38
38
39
39
mv ./packages/main/src/Main.res ./packages/main/src/Main2.res
40
40
rewatch build --snapshot-output & > ../tests/snapshots/rename-file.txt
41
+ normalize_paths ../tests/snapshots/rename-file.txt
41
42
mv ./packages/main/src/Main2.res ./packages/main/src/Main.res
42
43
43
44
# Rename a file with a dependent - this should trigger an error
44
45
mv ./packages/main/src/InternalDep.res ./packages/main/src/InternalDep2.res
45
46
rewatch build --snapshot-output & > ../tests/snapshots/rename-file-internal-dep.txt
46
- # normalize paths so the snapshot is the same on all machines
47
47
normalize_paths ../tests/snapshots/rename-file-internal-dep.txt
48
48
mv ./packages/main/src/InternalDep2.res ./packages/main/src/InternalDep.res
49
49
50
50
# Rename a file with a dependent in a namespaced package - this should trigger an error (regression)
51
51
mv ./packages/new-namespace/src/Other_module.res ./packages/new-namespace/src/Other_module2.res
52
52
rewatch build --snapshot-output & > ../tests/snapshots/rename-file-internal-dep-namespace.txt
53
- # normalize paths so the snapshot is the same on all machines
54
53
normalize_paths ../tests/snapshots/rename-file-internal-dep-namespace.txt
55
54
mv ./packages/new-namespace/src/Other_module2.res ./packages/new-namespace/src/Other_module.res
56
55
57
56
rewatch build & > /dev/null
58
57
mv ./packages/main/src/ModuleWithInterface.resi ./packages/main/src/ModuleWithInterface2.resi
59
58
rewatch build --snapshot-output & > ../tests/snapshots/rename-interface-file.txt
60
- # normalize paths so the snapshot is the same on all machines
61
59
normalize_paths ../tests/snapshots/rename-interface-file.txt
62
60
mv ./packages/main/src/ModuleWithInterface2.resi ./packages/main/src/ModuleWithInterface.resi
63
61
rewatch build & > /dev/null
64
62
mv ./packages/main/src/ModuleWithInterface.res ./packages/main/src/ModuleWithInterface2.res
65
63
rewatch build --snapshot-output & > ../tests/snapshots/rename-file-with-interface.txt
66
- # normalize paths so the snapshot is the same on all machines
67
64
normalize_paths ../tests/snapshots/rename-file-with-interface.txt
68
65
mv ./packages/main/src/ModuleWithInterface2.res ./packages/main/src/ModuleWithInterface.res
69
66
rewatch build & > /dev/null
70
67
71
68
# when deleting a file that other files depend on, the compile should fail
72
69
rm packages/dep02/src/Dep02.res
73
70
rewatch build --snapshot-output & > ../tests/snapshots/remove-file.txt
74
- # normalize paths so the snapshot is the same on all machines
75
71
normalize_paths ../tests/snapshots/remove-file.txt
76
72
git checkout -- packages/dep02/src/Dep02.res
77
73
rewatch build & > /dev/null
78
74
79
75
# it should show an error when we have a dependency cycle
80
76
echo ' Dep01.log()' >> packages/new-namespace/src/NS_alias.res
81
77
rewatch build --snapshot-output & > ../tests/snapshots/dependency-cycle.txt
78
+ normalize_paths ../tests/snapshots/dependency-cycle.txt
82
79
git checkout -- packages/new-namespace/src/NS_alias.res
83
80
84
81
# it should compile dev dependencies with the --dev flag
0 commit comments