-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix generateResourceAccessor
WASI regression
#3819
Conversation
generateResourceAccessor
regressiongenerateResourceAccessor
WASI regression
@swift-ci please smoke test |
@swift-ci please smoke test |
Do we need to differentiate on path vs. URL for WASI? I think right now it's easy to think that's the main change between the two code paths, when actually the difference is that we ask running compile vs. runtime. |
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.
pending @neonichu point about runtime behavior
I do prefer compile-time here for WASI, there's no benefit in evaluating this at runtime, especially as |
Sounds reasonable to me. I wasn't suggesting to change the behavior, but to change the code to make more clear what's happening, e.g. by adding some comments, so that the next person won't see this as an opportunity to refactor something :) |
Makes perfect sense, I'm adding a comment rn |
@swift-ci please smoke test |
@neonichu I feel seen |
Motivation:
Changes in #3463 broke resource accessor generation when building WASI/WebAssembly projects.
Modifications:
generateResourceAccessor
now checks if destination triple is targeting WASI, and uses old behavior from Swift 5.4 that works on this platform.Result:
Projects targeting WASI that contain resources no longer fail to build.