Azoy / Sword

Discord library for Swift
https://azoy.github.io/Sword
MIT License
179 stars 52 forks source link

"Sockets" not found #44

Closed Enovale closed 5 years ago

Enovale commented 6 years ago

When I try to build using the default settings from the installation tutorial, I get "Sockets" not found twice. I tried adding more dependencies like BlueSocket but it's not working. Any help?

MrLotU commented 6 years ago

Can you tell what line the error appears on? Also, if it's an issue with BlueSocket, you should talk to them if there are issues :)

Enovale commented 6 years ago

Doesn't specify the line, its in the initial build process, separate from main.swift, its in Package.swift. It simply says:

error: product dependency 'Sockets' not found

after cloning all of the repositories.

MrLotU commented 6 years ago

Ah, in that case, can you send your Package.swift file contents?

Enovale commented 6 years ago

Its simply the default from https://sword.azoy.me

but here:

// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "executable name",
    dependencies: [
        .package(url: "https://github.com/Azoy/Sword", from: "0.9.0"),
    ],
    targets: [
        .target(
            name: "executable name",
            dependencies: ["Sword"]
        )
    ]
)

This is without BlueSocket, since it didn't help

MrLotU commented 6 years ago

So, I take it somewhere in your code you import Sockets if you remove that, you should be fine

Enovale commented 6 years ago

1: I don't 2: That would break everything lmao

MrLotU commented 6 years ago

If you don't than you don't get the error you posted, error: product dependency 'Sockets' not found either means you have it in your dependencies, or have it in your project somewhere

Enovale commented 6 years ago

I don't have it in my main.swift, but its everywhere in dependencies, and needs to be. Discord bots depend on WebSockets

MrLotU commented 6 years ago

Could you send the full log of swift build because Sword should never break itself

Enovale commented 6 years ago

that error is the only output

Azoy commented 5 years ago

@ElijahZAwesome Sorry this took me so long to respond. Can you try to use the dev branch? .package(url: "https://github.com/Azoy/Sword", .branch("dev"))?

Enovale commented 5 years ago

works now, but as a side note im very confused on how to make sword work on iOS... anywhere else we can discuss that?

feetstv commented 5 years ago

The Discord API server, in the #swift_sword channel, would be ideal.