Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a54f508

Browse files
committed
Added easyjson generation task in Taskfile
1 parent 84d3769 commit a54f508

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

‎Taskfile.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ tasks:
119119
cmds:
120120
- go vet {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
121121

122+
go:easyjson-generate:
123+
desc: Run easyjson code generation
124+
cmds:
125+
- go install github.com/mailru/easyjson/...@v0.7.7
126+
- easyjson arduino/cores/packageindex/index.go
127+
- easyjson arduino/libraries/librariesindex/json.go
128+
122129
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml
123130
markdown:check-links:
124131
desc: Check for broken links

‎docs/CONTRIBUTING.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ func main() {
349349
}
350350
```
351351

352+
### About `easyjson` golang library
353+
354+
We use the hi-performance `easyjson` library to parse the large JSON index files for libraries and platforms. To obtain the best performance we must do some code generation, this is done via `task go:easyjson-generate`. If you ever touch source code using the `easyjson` library, make sure to re-run the `go:easyjson-generate` task to see if there are changes in the generated code.
355+
352356
### Additional settings
353357

354358
If you need to push a commit that's only shipping documentation changes or example files, thus a complete no-op for the

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /