File tree 5 files changed +11
-7
lines changed
tests/server/src/cases/issues
5 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -637,8 +637,11 @@ module Printer = struct
637
637
638
638
let s_module_tainting_reason = function
639
639
| CheckDisplayFile -> " check_display_file"
640
+ | DefineType -> " define_type"
641
+ | DefineModule -> " define_module"
640
642
| ServerInvalidate -> " server/invalidate"
641
643
| ServerInvalidateFiles -> " server_invalidate_files"
644
+ | ServerInvalidateModule -> " server_invalidate_module"
642
645
643
646
let s_module_skip_reason reason =
644
647
let rec loop stack = function
Original file line number Diff line number Diff line change @@ -32,8 +32,11 @@ type module_check_policy =
32
32
33
33
type module_tainting_reason =
34
34
| CheckDisplayFile
35
+ | DefineType
36
+ | DefineModule
35
37
| ServerInvalidate
36
38
| ServerInvalidateFiles
39
+ | ServerInvalidateModule
37
40
38
41
type module_skip_reason =
39
42
| DependencyDirty of path * module_skip_reason
Original file line number Diff line number Diff line change @@ -2332,7 +2332,7 @@ let macro_api ccom get_api =
2332
2332
let pos = get_api_call_pos() in
2333
2333
compiler_error (Error. make_error (Custom msg) pos)
2334
2334
with Not_found ->
2335
- com.cs#taint_module mpath ServerInvalidate );
2335
+ com.cs#taint_module mpath ServerInvalidateModule );
2336
2336
vnull
2337
2337
);
2338
2338
" server_invalidate_files" , vfun1 (fun a ->
Original file line number Diff line number Diff line change @@ -471,7 +471,7 @@ let make_macro_api ctx mctx p =
471
471
make_error ~depth: 1 (Custom " Previously defined here" ) pos
472
472
] (Custom (Printf. sprintf " Cannot redefine module %s" (s_type_path mpath))) p);
473
473
with Not_found ->
474
- ctx.com.cs#taint_module mpath ServerInvalidate ;
474
+ ctx.com.cs#taint_module mpath DefineType ;
475
475
let mdep = Option. map_default (fun s -> TypeloadModule. load_module ~origin: MDepFromMacro ctx (parse_path s) pos) ctx.m.curmod mdep in
476
476
let mnew = TypeloadModule. type_module ctx.com ctx.g ~dont_check_path: (has_native_meta) mpath (ctx.com.file_keys#generate_virtual mpath ctx.com.compilation_step) [tdef,pos] pos in
477
477
mnew.m_extra.m_kind < - if is_macro then MMacro else MFake ;
@@ -510,7 +510,7 @@ let make_macro_api ctx mctx p =
510
510
end else
511
511
ignore(TypeloadModule. type_types_into_module ctx.com ctx.g ctx.m.curmod types pos)
512
512
with Not_found ->
513
- ctx.com.cs#taint_module mpath ServerInvalidate ;
513
+ ctx.com.cs#taint_module mpath DefineModule ;
514
514
let mnew = TypeloadModule. type_module ctx.com ctx.g mpath (ctx.com.file_keys#generate_virtual mpath ctx.com.compilation_step) types pos in
515
515
mnew.m_extra.m_kind < - MFake ;
516
516
add_dependency mnew ctx.m.curmod MDepFromMacro ;
Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ class Issue12001 extends TestCase {
24
24
25
25
runHaxe (args );
26
26
assertSuccess ();
27
- // TODO: change invalidation reason
28
- assertSkipping (" Main" , DependencyDirty (" Foo - Tainted server/invalidate" ));
27
+ assertSkipping (" Main" , DependencyDirty (" Foo - Tainted define_type" ));
29
28
}
30
29
31
30
function testDefineModule (_ ) {
@@ -49,8 +48,7 @@ class Issue12001 extends TestCase {
49
48
50
49
runHaxe (args );
51
50
assertSuccess ();
52
- // TODO: change invalidation reason
53
- assertSkipping (" Main" , DependencyDirty (" Bar - Tainted server/invalidate" ));
51
+ assertSkipping (" Main" , DependencyDirty (" Bar - Tainted define_module" ));
54
52
}
55
53
56
54
@:async
You can’t perform that action at this time.
0 commit comments