Saelyria/Artemis

Setup Cannot Find - graphql file

Closed this issue · 1 comments

./Artemis-Generate --input "$PROJECT_DIR"/star.graphql --output "$PROJECT_DIR"/Models

I add the above common in my build phases, add added star.graphql file to my project.

but the following error is produced, on Xcode 11.4 project

Artemis-Generate[60233:3725847] Fatal error: No path to the schema file was specified: file

Hey @stunjiturner! First note is that it looks like something changed with the internal implementation of function builders sometime between around Xcode 11.1 that broke Artemis (or, at least, made type ambiguities that made it not compile without explicit generic type declarations, which makes the library much more difficult to use). I just got it back up and running using a snapshot of the master branch of Swift, so you'll need that snapshot (or wait for the next version of Xcode/likely Swift 5.3 or later once function builders can been officially added) to play with the library.

I did double check the codegen part of the library, though, and it should still be working with Xcode 11.4 / the Swift toolchain that shipped with it (though the sample project I had doesn't compile without a bunch of ugly explicit type definitions on the prod toolchain).

This is what my 'Run Script' build phase looks like (though yours likely looks the same):
Screen Shot 2020-04-24 at 9 49 24 AM

The specific error you posted is for if the --input argument isn't included (which it looks like it should be). Just in case - note that $PROJECT_DIR is the directory for where your .xcodeproj file is located, in case your star.graphql file is actually located inside the default project name source folder instead.

I'll try out a fresh install of the library on another machine and see if I just have some other build configuration I'm forgetting about as well.