Skip to content
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

[SR-9670] Driver should accept -serialize-diagnostics-path for the interpret mode #52114

Closed
belkadan opened this issue Jan 15, 2019 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project

Comments

@belkadan
Copy link
Contributor

Previous ID SR-9670
Radar rdar://problem/47293373
Original Reporter @belkadan
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Driver, StarterBug
Assignee dingobye (JIRA)
Priority Medium

md5: dc453f20454a4c64e2e42bc034bb9966

Issue Description:

The swift driver emits an error if you try to use -serialize-diagnostic option in the interpret mode. This makes sense because there is no place for it get the path of the diagnostic file (since there is no output file map). It could accept a -serialize-diagnostics-path flag to allow writing serializing diagnostics in this mode. This is required for XPM when parsing Package.swift manifest files.

$ swift -serialize-diagnostics test.swift
<unknown>:0: error: option '-serialize-diagnostics' is not supported by 'swift'; did you mean to use 'swiftc'?
@belkadan
Copy link
Contributor Author

The main reason for this restriction is because normally serialized diagnostics are placed next to object files, but with JIT mode there is no object file. But with JIT mode, you also know there's only going to be one file being compiled, and so it'd be okay to specify an explicit output path for serialized diagnostics.

@belkadan
Copy link
Contributor Author

If someone wants to pick this up as a StarterBug, let me know and I'll add more detail about how you'd go about implementing this.

@swift-ci
Copy link
Collaborator

Comment by Ding Ye (JIRA)

#22113

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project
Projects
None yet
Development

No branches or pull requests

2 participants