-
Notifications
You must be signed in to change notification settings - Fork 8
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
Custom error messages no longer propagate down to first non-inline calls #17
Comments
@mppf mentioned that |
@mppf I am having a bit of an issue here because technically the errorDepth is a bit dynamic, but easily provable at compile time. Lets say that each time a function is called a compile-time counter is incremented and when a function exits it gets decremented. This would be enough to obtain the chgl/src/modules/AdjListHyperGraph.chpl Lines 1001 to 1003 in 893ccf7
It does not include the dynamic compile-time counter yet as it will not compile. Any assistance with this? The ability to provide custom errors for the user was actually one of the highlights we made for the language (in the paper and presentation on CHGL), it would be nice to have this ability back. |
Can you say what the actual issue here is?
You can't modify a |
We describe vertices and edges via a wrapper ( The issue is that since we have internal functions calling other functions, which may vary in depth, it wouldn't be correct to hard-code the actual proc hasInclusion(v : vIndexType, e : eIndexType) {
const vDesc = toVertex(v);
const eDesc = toEdge(e);
return getVertex(vDesc).hasNeighbor(eDesc);
}
proc hasInclusion(vDesc : vDescType, e : eIndexType) {
const eDesc = toEdge(e);
return getVertex(vDesc).hasNeighbor(eDesc);
}
proc hasInclusion(v : vIndexType, eDesc : eDescType) {
const vDesc = toVertex(v);
return getVertex(vDesc).hasNeighbor(eDesc);
}
proc hasInclusion(vDesc : vDescType, e : eDescType) {
return getVertex(vDesc).hasNeighbor(eDesc);
}
proc hasInclusion(v, e) {
Debug.badArgs((v, e), ((vIndexType, eIndexType), (vDescType, eDescType), (vIndexType, eDescType), (vDescType, eIndexType)));
} Why do we have The compiler's default errors are ambiguous and vague at times, and very frustrating to work with at times. Custom and tailored error messages like this make it much easier to figure out what is wrong. Let me know if I was unclear in any way. Edit: I should mention that |
This issue is stale and should either be closed or eventually resolved. |
I wonder if it'd be sufficient to have something like compilerError that reported the line number at the module boundary (so ignored functions within the module with the compilerError). |
Custom error messages, generated via
compilerError
, allowed us to provide the user more helpful error messages on how to use our data structure to get around the ambiguity that arise from the default compiler error messages. These custom error messages used to show the callsite (file name and line number) of the first non-inlined function, usually where it was called by the user. NowcompilerError
stops at the first parent, despite it being inlined or not, meaning the custom error messages are no longer helpful but harmful...I need to create an issue on this or adapt to the new changes (which may mean no function that generates errors for me but good-old-fashioned copy-paste)
The text was updated successfully, but these errors were encountered: