Giter Club home page Giter Club logo

Comments (7)

swift-ci avatar swift-ci commented on September 2, 2024

Comment by Nikhil (JIRA)

owenvoorhees (JIRA User)

I would like to work on this. Please guide me with starting steps.

from swift-driver.

swift-ci avatar swift-ci commented on September 2, 2024

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.

swift-ci avatar swift-ci commented on September 2, 2024

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.

swift-ci avatar swift-ci commented on September 2, 2024

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.

swift-ci avatar swift-ci commented on September 2, 2024

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

  1. Searching for TODO gave me 31 results, I am interesting to contribute, so can you assign me some,

  2. 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.

AnthonyLatsis avatar AnthonyLatsis commented on September 2, 2024

@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.

owenv avatar owenv commented on September 2, 2024

Yes, this can be closed now, thanks for checking

from swift-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.