Aciid
(Ankit Aggarwal)
February 22, 2018, 2:28am
17
bppr:
In NodeJS, I can choose a test framework (qUnit, Jasmine, Mocha, among others), a bundler (Browserify, Webpack, Rollup, among others), and I can import and manage a pile of test-only and runtime dependencies, which means if I want a separate task-runner for my project, I just add gulp or grunt as a dev dependency.
In Java, I can install maven, gradle, or ant plugins. I can define different “profiles” in which those libraries are exposed. In Clojure, Leiningen plugins. In Ruby, I import code into a Rake task and call it.
Why can’t I do anything remotely close that with SwiftPM? I have to use XCTest (which has a horribly limited user experience on Linux) or SwiftPM won’t play. My test dependencies, if I even bother to try and put them into Package.swift, are exposed to consumers of my package, which means that if two libraries depend on differing versions of a test dependency, anyone who consumes both is in trouble.
I completely understand your frustration with lack of these features in SwiftPM. We really want to add first class support for things you listed, its just that we haven't gotten around to doing them. The Swift community should feel free to start discussions with a draft proposal about these features!
1 Like