-
Notifications
You must be signed in to change notification settings - Fork 207
Support VirtualPaths in ToolChain #77
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
Support VirtualPaths in ToolChain #77
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.
Looks good!
Btw, I think it looks more and more obvious that VirtualPath
is not a silver bullet for all path operations. Most of operations with them are correct only for absolute or relative path, I wonder if it can be made more robust, but introducing another layer like VirtualPath.filesystemPath(.absolute(foobar))
is also not looking good. It is probably worth looking at use cases of stdin/out and temporary to see if there is some good way.
Also, it's a bit unfortunate that TCSBasic
doesn't have ways to do operations with relative paths without resolving it to absolute path beforehand :(
…than absolute or relative paths
Going to take a look at stdin, stdout, and temporary usages. Maybe we introduce another type for the ToolChain that only has Absolute and Relative paths. |
case .standardInput, .standardOutput: | ||
preconditionFailure("standardInput and standardOutput do not have a pathString") | ||
case .temporary(let path): | ||
return path.pathString |
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.
This probably isn't correct. Given that this relative path doesn't contain the temporary directory.
The Swift project moved the default branch to More detail about the branch update - https://forums.swift.org/t/updating-branch-names/40412 |
Fixes:
Swift(macosx-x86_64) :: Driver/driver-use-frontend.swift
Swift(macosx-x86_64) :: Driver/linker-rpath.swift
This should go in after #73 since it copies some extensions from there.