twostraws / Ignite

A static site generator for Swift developers.
MIT License
1.63k stars 82 forks source link

Adding Ignite as a Package Dependency fails #56

Open nscalemodeller opened 3 months ago

nscalemodeller commented 3 months ago

I tried to add Ignite to a new Swift Command Line project and importing Ignite gives me a Package Resolution Failed error:

Ignite could not be resolved.

...Ignite Updating from http://github.com/twostraws/Ignite Failed to resolve dependencies Dependencies could not be resolved because root depend on 'ignite' 0.2.1..<1.0.0

I have very recent MacOS and Xcode and the IgniteStarter project work fine. Selecting the Add Anyway button gives me a single Ignite package but none of the other packages load and the Ignite package can't be opened.

twostraws commented 3 months ago

This appears to be the result of us depending on swift-markdown. Annoyingly, that (official Apple!) project suggests folks target the main branch directly, which is what I think is likely causing the problem: you specify "Up to next major" for Ignite, but Ignite depends internally on the shifting sands of swift-markdown's "main" branch, so SPM can't guarantee it's safe. It's a bit of a guess, but over on the swift-markdown repository it looks like we're not alone: https://github.com/apple/swift-markdown/issues/178

tgunr commented 3 months ago

So what is a solution? I have same problem.

twostraws commented 3 months ago

The solution, at least for now, is perhaps not to add Ignite as a dependency, but to clone the Ignite Starter repository using the Ignite CLI tool – it's a significantly easier way to get started with Ignite. I realize it's not ideal for folks who want to integrate Ignite into an existing project, but I suspect they are fairly rare.