Comments (7)
Comment by Nikhil (JIRA)
owenvoorhees (JIRA User)
I would like to work on this. Please guide me with starting steps.
from swift-driver.
Comment by Owen Voorhees (JIRA)
srinikhil07 (JIRA User) Hi! I'd recommend starting by checking out and building swift-driver if you haven't already and making sure you can run the tests. There are directions on how to do that in the README here: https://github.com/apple/swift-driver/blob/master/README.md.
After that, if you take a look at the first link in description you'll see that there are three TODOs in DarwinToolchain.validateArguments that correspond to three validation steps the C++ driver is performing in the second link. Of those, `// TODO: Validating darwin unsupported -static-stdlib argument.` is probably the best starting point. This check emits a diagnostic if somebody passes the `-static-stdlib` argument to the driver when compiling for a Darwin platform (macOS/iOS/etc.), and can probably be included directly in DarwinToolchain.validateArguments. Once that's implemented, you should be able to add a test in SwiftDriverTests.swift which verifies the diagnostic is emitted.
Feel free to let me know if you have any questions! The README also links to some other documentation about the driver that might be helpful.
from swift-driver.
Comment by Nikhil (JIRA)
owenvoorhees (JIRA User)
Hi. Thanks for the steps.
I could build the swift-driver, but any test I run I get the below error. Guess I am missing something,
/Users/user/Code/driver-swift/swift-driver/Sources/SwiftDriver/Execution/DriverExecutor.swift:67: error: -[SwiftDriverTests.AssertDiagnosticsTests testAssertDriverDiagosotics] : failed: caught error: "keyNotFound(CodingKeys(stringValue: "compilerVersion", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"compilerVersion\", intValue: nil) (\"compilerVersion\").", underlyingError: nil))"
I have done the three TODOs and wrote tests as well. I have to test them.
from swift-driver.
Comment by Owen Voorhees (JIRA)
srinikhil07 (JIRA User) That error usually occurs if swift-driver is finding an older Swift toolchain. To run the tests, I think you'll need to install a recent trunk snapshot from swift.org, or use a locally built swift. Then, you can use it in tests by setting the SWIFT_DRIVER_SWIFT_FRONTEND_EXEC environment variable to point to it. Something like the following should work, or you can add the variable in the Xcode scheme editor:
SWIFT_DRIVER_SWIFT_FRONTEND_EXEC=path/to/snapshot/toolchain/bin/swift-frontend swift test
from swift-driver.
Comment by Nikhil (JIRA)
owenvoorhees (JIRA User)
Please review #184
Do we have anything like clang-format for formatting Swift code here.
Also, I am not sure where to ask, so I am asking here
-
Searching for TODO gave me 31 results, I am interesting to contribute, so can you assign me some,
-
I have seen below comment for class DarwinToolchain. I am curious about how this is fixed. Can I try ?
//FIXME: This class is not thread-safe.
Thanks.
from swift-driver.
@owenv Could you see if we can close this (the associated pull request is merged)? Thanks.
@shahmishal Could we transfer this issue to the swift-driver repo?
from swift-driver.
Yes, this can be closed now, thanks for checking
from swift-driver.
Related Issues (20)
- Driver diagnostics (such as remarks and errors) don't obey `-parseable-output` HOT 7
- Group CLI options for easier navigation HOT 1
- Cargo Termizi
- Crash due to an assertion in libswiftCore
- Xcode 14.3 RC 2 (14E222b) not pass '-strict-implicit-module-context' flag to swift-frontend
- `Process.findExecutable(arguments[0])` gives an unexpected result HOT 5
- Windows builds broken when querying target-info from libSwiftScan HOT 2
- Swift Potentially Uses the Wrong Swift Driver HOT 15
- "swift build" command duplicates error messages HOT 8
- iOS get error Dependency for P1: Debug:SwiftDriver Compilation Requirements app normal arm64 com.apple.xcode.tools.swift.compiler is not absolute
- swift help build doesn't work when it's documented to
- Test suite broken on Windows due to CAS HOT 1
- SPM doesn't enumerate source files properly in different configurations HOT 6
- tests crash on windows HOT 1
- `swift run` usage suggestion should be fixed HOT 1
- Program is several times slower when compiled with swiftc than when compiled with XCode due to retain&release calls HOT 1
- “swift ./-” does the same as “swift -” HOT 5
- This driver no longer looks in a passed-in `-sdk` for the Swift modules and libraries HOT 2
- Using -g for non-macho targets can cause driver planning errors
- Leaking temporary directory and file /tmp/TemporaryDirectory.*/dummyInput-*.swift
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-driver.