-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
runtime: status of relative filenames in //line directives unclear #26207
Comments
What you say in the //line directive is what you get. If you want foo/bar.go you need to say foo/bar.go. |
The behavior seems a little unfortunate to me. Not pictured here, but |
Sorry, I guess I don't understand what you mean. OK, maybe I do see what you mean. You are saying that the default file paths returned by So you are requesting some way that a code generator can produce a |
Your understanding is correct. Apologies for my terseness. Restating slightly, my observation is that without
With a
I don't see a way to place a filename in a If you'd like, I can open up a separate feature request for changing the |
I think the current behavior is specified. The docs say "A line directive specifies the source position for the character immediately following the comment as having come from the specified file, line and column." I think you are asking for a way to specify a relative path that the compiler will change to an absolute path, rather than simply using "the specified file." |
I am asking for that, but even in the absolute path case, |
FWIW, golang.org/cl/100235 seems related to this ambiguity. |
I'd like to be able to specify relative paths in
//line
directives, but it's unclear whether this is permitted. Experimentally, it seems as though they are not. #3335 and #24183 are both related in terms of trying to specify what's allowed in the directive, but I haven't seen this specific issue mentioned.(For
runtime.Caller
info, it seems to expect that the filename is an absolute path.)What did you do?
What did you expect to see?
What did you see instead?
System details
The text was updated successfully, but these errors were encountered: