Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building from local and modified sources ? #339

Closed
d-a-v opened this issue Sep 22, 2019 · 5 comments
Closed

Building from local and modified sources ? #339

d-a-v opened this issue Sep 22, 2019 · 5 comments
Assignees
Labels
conclusion: resolved Issue was resolved type: support OT: Request for help using the project

Comments

@d-a-v
Copy link

d-a-v commented Sep 22, 2019

Hello,

I can't find in documentation how to compile arduino-builder from my local sources.

I can git clone then go build and it works.

However when I modify something in src/github.com/arduino/arduino-cli/ I can never get my sources properly compiled.

Tweaking by pushing updates in an arduino-cli fork and updating github refs gives some results - my sources are compiled - but in the end this process fails to get to the final arduino-builder executable because of unmatching git urls.

Thank you for your help.

Edit
I understand arduino-cli is another repository, and that this tool is included in arduino-builder.
I would like arduino-builder to be built with my changes from arduino-cli.

@facchinm
Copy link
Member

@cmaglie any hint on how to work with this flow when using go.mod ?

@cmaglie
Copy link
Member

cmaglie commented Sep 23, 2019

it's very simple, change your go.mod by adding a replace line, like this:

module github.com/arduino/arduino-builder

go 1.12

replace github.com/arduino/arduino-cli => ../arduino-cli

require (
	github.com/arduino/arduino-cli v0.0.0-20190920124130-b6774033151c
	github.com/arduino/go-paths-helper v1.0.1
	github.com/arduino/go-properties-orderedmap v0.0.0-20190828172252-05018b28ff6c
	github.com/go-errors/errors v1.0.1
	github.com/juju/errors v0.0.0-20190207033735-e65537c515d7 // indirect
	github.com/sirupsen/logrus v1.4.2
)

once saved the go tooling will ignore the dependecy written in the require section and will use the relative path to your local copy specified in the replace line.

@d-a-v
Copy link
Author

d-a-v commented Sep 24, 2019

Thanks !
This should be documented in CONTRIBUTING.md

To build with latest arduino-cli, I had to do (in arduno-cli):

git log legacy/builder/gohasissues/go_has_issues.go
git diff 25cb6789ae73d9f69393d2afbd0699f5bcb041c8..d94fe6c2fa894cfe67f6aa8866261739afbd6884 legacy/builder/gohasissues/go_has_issues.go | patch -p1 -R

(because of:)

./main.go:289:20: undefined: gohasissues.Unquote
./main.go:303:28: undefined: gohasissues.Unquote
./main.go:323:34: undefined: gohasissues.Unquote
./main.go:342:34: undefined: gohasissues.Unquote
./main.go:426:13: undefined: gohasissues.Unquote

With the arduino IDE and arduino/arduino-cli#421 I can now build external arduino projects that were designed to be managed by PIO only.

@cmaglie
Copy link
Member

cmaglie commented Sep 24, 2019

I see, well we're going to merge arduino/arduino-cli#421 so this will not be a problem anymore.

@cmaglie
Copy link
Member

cmaglie commented Oct 1, 2019

There should not be anymore build errors in the master branch due to dependency on arduino-cili.

@cmaglie cmaglie closed this as completed Oct 1, 2019
@rsora rsora added the type: support OT: Request for help using the project label Sep 22, 2021
@per1234 per1234 added the conclusion: resolved Issue was resolved label Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved type: support OT: Request for help using the project
Projects
None yet
Development

No branches or pull requests

5 participants