Git Product home page Git Product logo

Comments (6)

stephencelis avatar stephencelis commented on July 22, 2024 1

@JRHeaton I chatted with the SPM team and it looks like this will be fixed in the future: https://github.com/apple/swift-evolution/blob/60266bb8d125dee56f2d270b3fd25aa9eeeb63c8/proposals/0226-package-manager-target-based-dep-resolution.md

from swift-tagged.

stephencelis avatar stephencelis commented on July 22, 2024 1

@JRHeaton While every dependency needs to be downloaded these days to resolve the current graph, only the dependencies your project uses will be built. You shouldn't see much of an increase in CI time because the downloads are quite fast. Downloading and resolving the Tagged graph takes about 11 seconds for us: https://travis-ci.org/pointfreeco/swift-tagged

Many CI services also offer the ability to cache directories between builds to speed things up. If you use one of these features, you should see no increase in CI time.

It's becoming more and more common to use Package.swift as a way of managing Swift development dependencies as described here: https://artsy.github.io/blog/2019/01/05/its-time-to-use-spm/

And it's been common in the past for folks to use CocoaPods to manage a development dependency on, say, SwiftLint. The main issue seems to be that SPM hasn't caught up quite yet.

Brandon and I are open to revisiting things, but want to better understand the concern.

from swift-tagged.

stephencelis avatar stephencelis commented on July 22, 2024 1

@JRHeaton Just to follow up, it's been brought to our attention that we can scope development dependencies using environment variables (thanks @inamiy), so we'll avoid these excess downloads soon! See 77bdcc1

from swift-tagged.

stephencelis avatar stephencelis commented on July 22, 2024

Hey @JRHeaton! We use XcodeGen to generate Xcode projects for most of our libraries, mainly to support Carthage. While we were originally running un-vendored versions of xcodegen, our versions were going out of sync and we were seeing some back-and-forth churn in the project file format. Ideally SwiftPM would have the notion of developmentDependencies, or allow for something like Package.development.swift, but I don't think any such thing exists right now :/ The extra dependencies are definitely annoying, but it's a quirk of how SwiftPM works right now and shouldn't have a noticeable impact on your project. Do you have any specific concerns that these packages are being downloaded?

from swift-tagged.

JRHeaton avatar JRHeaton commented on July 22, 2024

@stephencelis Right, and while I'm happy to see that in the future unused dependencies won't be built per that proposal, it's the fact that it's in the Package.swift in this case at all that is confusing. XcodeGen isn't needed for any part of the actual project itself; it's (if I understand correctly) just for maintenance purposes during development to, as you said, generate projects, etc.

So essentially my concern is that now every project that I use with Tagged(which is most if not all) now has to download and build 13 new targets, most of which are library dependencies for an executable that again, is for dev/maintenance, not usage of the library. This is a timely I'm sure, especially on CI.

from swift-tagged.

JRHeaton avatar JRHeaton commented on July 22, 2024

@stephencelis Thanks for the correction of my assumption that SPM would build those unreferenced targets. I guess this means the behavior is benign until now until SPM is upgraded; I just wanted to raise this to make sure it was not a leftover artifact from the time/money PR as we noticed these new dependencies in our Package.resolved in code review at work and it led me to Tagged 😇

I'll go ahead and close this. Thank you again for the clarification and the links!

from swift-tagged.

Related Issues (16)

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.