Git Product home page Git Product logo

Comments (2)

Jeehut avatar Jeehut commented on May 30, 2024

Are you sure that we have this bug? Cause in this line there is an early return in case that any of the required frameworks is not cached yet and given that we use the current Swift version here when building the cache path. If anything I think that solving #62 will also fix this, then.

from accio.

fredpi avatar fredpi commented on May 30, 2024

@Dschee I'm also experiencing this when running Accio with the changes from #62, so it's not solved via that PR.

I looked up the code and found the issue. It is with the cacheFileSubPath of CachedFrameworkProduct, implemented as follows:

struct CachedFrameworkProduct: Codable {
    let swiftVersion: String
    let libraryName: String
    let commitHash: String
    let platform: String

    var cacheFileSubPath: String {
        return "\(swiftVersion)/\(libraryName)/\(commitHash)/\(platform).zip"
    }
}

As the swiftVersion is actually stored in the Manifest json, it's this cached Swift version that is used to copy the framework and check for the existence of the files (therefore not triggering the check you referenced). It should instead use the current Swift version, as the Package may have been resolved with Swift 5.0.1, while the user is now running Swift 5.1.

Is it needed to store a resolved manifest json for each Swift version? (like, is it possible that the resolving result is different for different Swift versions?) In that case, we shouldn't store the swiftVersion in the manifest json, but rather include it in the file name.

Otherwise, I propose to just drop the swiftVersion property from the CachedFrameworkProduct and use the current Swift version for path calculation instead.

from accio.

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.