ajstarks / giocanvas

Canvas API built with Gio
Other
141 stars 14 forks source link

build busted #2

Closed joe-getcouragenow closed 4 years ago

joe-getcouragenow commented 4 years ago

Did a checkout on master, but build is broken due to dependencies.

Do you want to fix or should i have a go ??


all: init build run

init:
    cd play && go mod init
build:
    ## desk
    cd play && go build -o $(PWD)/bin/play
run:
    open $(PWD)/bin/play

i get:


cd /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas/play && go build -o /Users/apple/workspace/go/src/codeberg.org/gerard.webb/junk/sdk/gui/gio/ajstarks-giocanvas/bin/play
go: finding module for package gioui.org/io/key
go: finding module for package gioui.org/unit
go: finding module for package gioui.org/f32
go: finding module for package gioui.org/app
go: finding module for package github.com/ajstarks/giocanvas
go: finding module for package gioui.org/io/system
go: found gioui.org/app in gioui.org v0.0.0-20200630184602-223f8fd40ae4
go: found github.com/ajstarks/giocanvas in github.com/ajstarks/giocanvas v0.0.0-20200630185103-0ffc0a4d0f72
can't load package: package github.com/ajstarks/giocanvas/play: ambiguous import: found package github.com/ajstarks/giocanvas/play in multiple modules:
        github.com/ajstarks/giocanvas/play (/Users/apple/workspace/go/src/github.com/ajstarks/giocanvas/play)
        github.com/ajstarks/giocanvas v0.0.0-20200630185103-0ffc0a4d0f72 (/Users/apple/workspace/go/pkg/mod/github.com/ajstarks/giocanvas@v0.0.0-20200630185103-0ffc0a4d0f72/play)
make: *** [build] Error 1
ajstarks commented 4 years ago

I'd like to see your fix. At this point, I believe removing the go mod init will also work.

what happens when you do this:

$ cd /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas/ $ ./bc.sh $ ./rc.sh

joe-getcouragenow commented 4 years ago

thanks for your patience...

SO this does work, and opens all the apps...


build-all:
    cd $(CAN_LIB_FSPATH) && go mod init

    cd $(CAN_LIB_FSPATH) && chmod +x *.sh 
    cd $(CAN_LIB_FSPATH) && ./bc.sh
    cd $(CAN_LIB_FSPATH) && ./rc.sh

Without the go mod init, you get this log:

#cd /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas && go mod init
cd /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas && chmod +x *.sh 
cd /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas && ./bc.sh
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
go: cannot find main module, but found .git/config in /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas
        to create a module there, run:
        cd .. && go mod init
cd /Users/apple/workspace/go/src/github.com/ajstarks/giocanvas && ./rc.sh
./rc.sh: line 5: ./alpha: No such file or directory
./rc.sh: line 5: ./concentric: No such file or directory
./rc.sh: line 5: ./compchart: No such file or directory
./rc.sh: line 5: ./confetti: No such file or directory
./rc.sh: line 5: ./eclipse: No such file or directory
./rc.sh: line 5: ./flowers: No such file or directory
./rc.sh: line 5: ./hello: No such file or directory
./rc.sh: line 5: ./lines: No such file or directory
./rc.sh: line 5: ./mondrian: No such file or directory
./rc.sh: line 5: ./polar: No such file or directory
./rc.sh: line 5: ./sunearth: No such file or directory
./rc.sh: line 5: ./tile: No such file or directory
./rc.sh: line 5: ./transform: No such file or directory
./rc.sh: line 5: ./twrap: No such file or directory
./rc.sh: line 5: ./play: No such file or directory 
joe-getcouragenow commented 4 years ago

so i think this is resolved then ???

ajstarks commented 4 years ago

will close. at this stage i'm not using go modules, so you can remove it from your scripts.

I'm not sure why you are using Makefiles, as the standard go build commands are smart enough not to rebuild if not required.

joe-getcouragenow commented 4 years ago

I use makefiles because I have to do lots of context switching / work on so many things at once. So a makefile makes it easy to see how each project is built.

"horses for courses" as they say :)

ajstarks commented 4 years ago

Cool.