-
Notifications
You must be signed in to change notification settings - Fork 301
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
use #fileID for Swift 5.3+ #187
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, it's a change in logged info but I don't think that's something we need to major bump for. For what it's worth, it was kind of sometimes broken before as you explain... 👍
@ktoso I agree that we don't need a major. In theory it could break some backends (which parse the path) but I don't think we really guaranteed that it's the full file path... |
@swift-server-bot test this please |
43d3599
to
f5d54e4
Compare
Motivation: Right now, we use the full path (`#file`) for the logging as well as for parsing out the module name (which goes into `source` by default). This has two problems: 1. The file names contain the build server's full path, ie. aren't portable across different compiles (and are very long). 2. The module name parsing fails if we log from a file that's not in a directory named just like the module. Modification: Switch `#file` for `#fileID`. This changes a bunch of things: - `source` is always the module name by default (great!) - `file` changes from `/the/full/path/on/disk` to `ModuleName/FileBaseName.swift` (I think better, but it's a change) Result: `source` is more correct, `file` will be different.
late LGTM |
Motivation:
Right now, we use the full path (
#file
) for the logging as well as forparsing out the module name (which goes into
source
by default).This has two problems:
portable across different compiles (and are very long).
directory named just like the module.
Modification:
Switch
#file
for#fileID
. This changes a bunch of things:source
is always the module name by default (great!)file
changes from/the/full/path/on/disk
toModuleName/FileBaseName.swift
(I think better, but it's a change)Result:
source
is more correct,file
will be different.