-
Notifications
You must be signed in to change notification settings - Fork 424
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
[Bug]: Dyno reports the wrong location for minimal modules #26578
Comments
How did minimal modules become involved originally with the problem with |
This was found by running |
I bet the issue is more general: if you open any module named the same as a standard module (but not the standard module Chapel would load), you'd run into this. |
The way we have library loading implemented right now, something in the standard module search path takes priority, and we don't have a facility for two modules with the same name. So I would expect that the best case in this situation would be that |
Note that I tried this with something like "mymod/Sort.chpl" and that was fine, both the module contents and file location were reported correctly. And I find it puzzling that with CTypes, the module contents are correct but the file location is wrong. So we are parsing the right file, but then when mapping the ID of CTypes we end up with the wrong module. |
FWIW, I would expect problems with "mymod/Sort.chpl" that you just haven't uncovered yet. CTypes might be behaving differently due to it being more important when compiling more internal code. |
I am finding that with the standard library enabled, that Dyno reports incorrect locations for minimal modules.
The following
chapel-py
program shows the problemIn this example,
mod.dump()
shows the correct AST formodules/minimal/internal/CTypes.chpl
, but the location is printed asmodules/standard/CTypes.chpl
.I tried this with a module outside the "blessed" path, using
Sort.chpl
as a proxy. This could not replicate the issue, so I think this error is specific to two internal modules of the same name (as is the case with minimal modules)This causes problems for some
chplcheck
lint rules which rely on location information for a Module (like LineLength)The text was updated successfully, but these errors were encountered: