-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report_package
seems to ignore ignored_modules
#570
Comments
+1, also seeing this. @aviatesk maybe this is just a missed call somewhere in |
I'm debugging this and it does seem like it actually does module matching on the ignored modules: struct MyAnyFrameModule; mod::Module; end
function JET.match_module(mod::MyAnyFrameModule, @nospecialize(report::JET.InferenceErrorReport))
return true
end
JET.test_package(
DynamicExpressions;
target_defined_modules=true,
ignored_modules=(
MyAnyFrameModule(
DynamicExpressions.NonDifferentiableDeclarationsModule
),
),
) this throws no errors whereas before it did. Not sure why it's not working though... |
It seems to be because JET puts stuff in a VirtualModule maybe? The JET.linfomod((first(report.vst)).linfo) = Main.var"##JETVirtualModule#575".DynamicExpressions.NonDifferentiableDeclarationsModule Anyways, here is my current workaround (which works, and also tags submodules) using DynamicExpressions
struct MyIgnoredModule
mod::Module
end
function JET.match_module(mod::MyIgnoredModule, @nospecialize(report::JET.InferenceErrorReport))
s_mod = string(mod.mod)
any(report.vst) do vst
occursin(s_mod, string(JET.linfomod(vst.linfo)))
end
end
JET.test_package(
DynamicExpressions;
target_defined_modules=true,
ignored_modules=(MyIgnoredModule(DynamicExpressions.NonDifferentiableDeclarationsModule),),
) |
Yes, the problem is that JET's top-level analysis virtualizes the module context of the target file or package (specifically, it's a hack to avoid issues discussed in JuliaLang/julia#40399). |
Example:
So, it looks to me like
report_package
doesn't work withignored_modules
?The text was updated successfully, but these errors were encountered: