Skip to content

Commit 33c223f

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 95ebd3c + b91cea8 commit 33c223f

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,23 @@ See [Doing continuous integration with arduino builder](https://github.com/ardui
5757

5858
You need [Go 1.6.3](https://golang.org/dl/#go1.6.3).
5959

60-
Repo root contains the script `setup_go_env_vars`. Use it as is or as a template for setting up Go environment variables.
61-
6260
To install `codereview/patch` you have to install [Mercurial](https://www.mercurial-scm.org/) first.
6361

64-
Once done, run the following commands:
62+
To set things up, run the following inside the cloned arduino-builder
63+
directory:
6564

6665
```
66+
export GOPATH=$(pwd)
6767
go get github.com/go-errors/errors
6868
go get github.com/stretchr/testify
6969
go get github.com/jstemmer/go-junit-report
7070
go build arduino.cc/arduino-builder
7171
```
7272

73+
After installing dependencies, you do not need to run the `go get`
74+
commands again, but you will have to set `GOPATH` again for every shell
75+
you want to build in.
76+
7377
### TDD
7478

7579
In order to run the tests, type:

setup_go_env_vars

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/arduino.cc/builder/constants/constants.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ const MSG_BUILD_OPTIONS_CHANGED = "Build options changed, rebuilding all"
158158
const MSG_CANT_FIND_SKETCH_IN_PATH = "Unable to find {0} in {1}"
159159
const MSG_FQBN_INVALID = "{0} is not a valid fully qualified board name. Required format is targetPackageName:targetPlatformName:targetBoardName."
160160
const MSG_INVALID_QUOTING = "Invalid quoting: no closing [{0}] char found."
161+
const MSG_IGNORED_BUILTIN_TOOLS_TXT = "Skipping {0}; please consider removing that file since it may hurt older Arduino installations"
161162
const MSG_LIB_LEGACY = "(legacy)"
162163
const MSG_LIBRARIES_MULTIPLE_LIBS_FOUND_FOR = "Multiple libraries were found for \"{0}\""
163164
const MSG_LIBRARIES_NOT_USED = " Not used: {0}"

src/arduino.cc/builder/tools_loader.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ func (s *ToolsLoader) Run(ctx *types.Context) error {
5252
if err != nil {
5353
return i18n.WrapError(err)
5454
}
55+
builtinHardwareFolder := ""
56+
if len(ctx.BuiltInLibrariesFolders) > 0 {
57+
builtinHardwareFolder, err = filepath.Abs(filepath.Join(ctx.BuiltInLibrariesFolders[0], ".."))
58+
}
59+
60+
if builtinToolsVersionsFile != constants.EMPTY_STRING && !strings.Contains(builtinToolsVersionsFile, builtinHardwareFolder) {
61+
ctx.GetLogger().Println(constants.LOG_LEVEL_WARN, constants.MSG_IGNORED_BUILTIN_TOOLS_TXT, builtinToolsVersionsFile)
62+
builtinToolsVersionsFile = constants.EMPTY_STRING
63+
}
64+
5565
if builtinToolsVersionsFile != constants.EMPTY_STRING {
5666
err = loadToolsFrom(&tools, builtinToolsVersionsFile)
5767
if err != nil {

0 commit comments

Comments
 (0)