thejoshwolfe / legend-of-swarkland

Turn-based action fantasy puzzle game inspired by NetHack and Crypt of the Necrodancer
http://wolfesoftware.com/legend-of-swarkland/
Other
94 stars 5 forks source link

Building with master fails #69

Closed delaneyj closed 2 years ago

delaneyj commented 4 years ago

I'm sure zig master is a moving target but getting Declarations are not allowed between container fields errors when trying to build on linux. Specifically

./deps/zig-sdl/example/main.zig:28:20: error: expected ')', found 'StringLiteral'
        c.SDL_Log(c"Unable to initialize SDL: %s", c.SDL_GetError());
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/core/protocol.zig:111:5: error: Declarations are not allowed between container fields
    pub const Attack = struct {
    ~~~
./src/server/game_engine.zig:1117:9: error: Declarations are not allowed between container fields
        const Movement = struct {
        ~~~~~
./src/server/game_model.zig:46:5: error: Declarations are not allowed between container fields
    pub const IdAndCoord = struct {
    ~~~
./src/client/game_engine_client.zig:136:5: error: Declarations are not allowed between container fields
    const ChildProcessData = struct {
    ~~~~~
thejoshwolfe commented 4 years ago

I'm pretty diligent about documenting the version of zig i'm using. from the readme:

Get a very recent build of zig. I'm developing off of zig's master branch, so check my commit log for "updated to zig xxxxxx" commits to know which version to use.

Telling people to search through the commit history for build instructions isn't a great solution, but zig being a moving target is tricky, and this solution does work correctly forever. The only problems with it are the dependencies for building zig itself from source at arbitrary revisions.

andrewrk commented 4 years ago

I'm pretty sure swarkland master branch works with zig 0.6.0.

(tested it just now, works)

thejoshwolfe commented 2 years ago

I'm pretty diligent about documenting the version of zig i'm using. from the readme:

Referring to myself as "diligent" in this project is a bit of a knee slapper. :grimacing:

Well, this project is active again now, and it's building against Zig 0.9.0. Targeting Zig master branch is tricky. I might try to stay on 0.9.0 for a while now. The readme is updated.