fitscore icon indicating copy to clipboard operation
fitscore copied to clipboard

Package manager import not working

Open triple7 opened this issue 3 years ago • 5 comments

Hi,

First off thanks for this great module, it will really help me take a lot of server code out and put it into my app's client side functionality.

I've just finished a Swift wrapper for the MAST API https://github.com/triple7/SwiftMAST

I am at the point of testing product downloads and file manipulation using FITSCore.

Just followed the instructions but I get the 2 errors below: SwiftMAST, 3 issues dependency 'fitscore' is not used by any target product 'FITS' required by package 'swiftmast' target 'SwiftMAST' not found. FITS, Error No such module 'FITS'

The relevant portions are:

            targets: ["SwiftMAST"]),
    ],
    dependencies: [
        .package(url: "https://github.com/brampf/fitscore", .upToNextMajor(from: "0.3.0")),    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages this package depends on.
        .target(
            name: "SwiftMAST",
            dependencies: ["FITS"]),

Hopefully I can get an answer as I'm working starting Tuesday and would like to have this package completed before then haha

Happy new year :)

triple7 avatar Jan 01 '23 08:01 triple7

Hi,

first of all: a happy new year to you, too :)

On the topic: it seems like something changed in the swift package manager since I wrote that documentation. Since the name of the package and the target differ, you need to explicitly name the package in the dependencies. Have a look over at FITSKit. Apologies for not keeping the documentation up-to-date. But this project is still maintained. So in case you need something, please feel free to ask.

brampf avatar Jan 01 '23 09:01 brampf

Hi,

thanks for the quick reply.

I looked at the file, and it seems there are further deprecated issues going on there.

I’ve changed it up, and got it where the module imports, but the dependency on Numerics is causing another chain issue there.

The error message is:

Failed to resolve dependencies Dependencies could not be resolved because root depends on 'swift-numerics' 1.0.0..<2.0.0 and 'fitscore' depends on 'swift-numerics' 0.0.5..<1.0.0.

Would it be possible to changed the dependency of Numerics in FITSCore to the above?

Thanks

On 1 Jan 2023, at 7:03 pm, May @.***> wrote:

Hi,

first of all: a happy new year to you, too :)

On the topic: it seems like something changed in the swift package manager since I wrote that documentation. Since the name of the package and the target differ, you need to explicitly name the package in the dependencies. Have a look over at FITSKit https://github.com/brampf/fitskit/blob/master/Package.swift. Apologies for not keeping the documentation up-to-date. But this project is still maintained. So in case you need something, please feel free to ask.

— Reply to this email directly, view it on GitHub https://github.com/brampf/fitscore/issues/17#issuecomment-1368391456, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJHQFJ6DIOPKOFJ4NFVS2DWQFB4TANCNFSM6AAAAAATN7VWLA. You are receiving this because you authored the thread.

triple7 avatar Jan 01 '23 11:01 triple7

Hi Again,

I think I will fork and do some pull requests once I got the basics done and I can do some operations with FITSCore. The module is important enough in my investigations to warrant some love haha.

On 1 Jan 2023, at 7:03 pm, May @.***> wrote:

Hi,

first of all: a happy new year to you, too :)

On the topic: it seems like something changed in the swift package manager since I wrote that documentation. Since the name of the package and the target differ, you need to explicitly name the package in the dependencies. Have a look over at FITSKit https://github.com/brampf/fitskit/blob/master/Package.swift. Apologies for not keeping the documentation up-to-date. But this project is still maintained. So in case you need something, please feel free to ask.

— Reply to this email directly, view it on GitHub https://github.com/brampf/fitscore/issues/17#issuecomment-1368391456, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJHQFJ6DIOPKOFJ4NFVS2DWQFB4TANCNFSM6AAAAAATN7VWLA. You are receiving this because you authored the thread.

triple7 avatar Jan 01 '23 11:01 triple7

Final hi,

Works fine now. This swift-package thing is a bit wonky sometimes :/

On 1 Jan 2023, at 7:03 pm, May @.***> wrote:

Hi,

first of all: a happy new year to you, too :)

On the topic: it seems like something changed in the swift package manager since I wrote that documentation. Since the name of the package and the target differ, you need to explicitly name the package in the dependencies. Have a look over at FITSKit https://github.com/brampf/fitskit/blob/master/Package.swift. Apologies for not keeping the documentation up-to-date. But this project is still maintained. So in case you need something, please feel free to ask.

— Reply to this email directly, view it on GitHub https://github.com/brampf/fitscore/issues/17#issuecomment-1368391456, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJHQFJ6DIOPKOFJ4NFVS2DWQFB4TANCNFSM6AAAAAATN7VWLA. You are receiving this because you authored the thread.

triple7 avatar Jan 01 '23 11:01 triple7

Well, it seems like this lib needs update and probably could get rid of the numerics dependency at all like it does on linux. Feel free to create a pull request, I'm looking forward to review and merge

brampf avatar Jan 01 '23 16:01 brampf