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

Upgrade go-serial library (fix high CPU load with some CH340 usb-2-serial converters) #114

Merged
merged 2 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-go-dependencies-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check Go Dependencies

env:
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
GO_VERSION: "1.18.5"
GO_VERSION: "1.24"

# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
on:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check Go

env:
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
GO_VERSION: "1.18.5"
GO_VERSION: "1.24"

# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
on:
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
version: v1.64.7

- name: Check style
env:
Expand Down
6 changes: 3 additions & 3 deletions .licenses/serial-monitor/go/go.bug.st/serial.dep.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: go.bug.st/serial
version: v1.6.2
version: v1.6.3
type: go
summary: Package serial is a cross-platform serial library for the go language.
homepage: https://pkg.go.dev/go.bug.st/serial
Expand All @@ -9,7 +9,7 @@ licenses:
- sources: LICENSE
text: |2+

Copyright (c) 2014-2023, Cristian Maglie.
Copyright (c) 2014-2024, Cristian Maglie.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -43,7 +43,7 @@ licenses:

- sources: README.md
text: |-
The software is release under a [BSD 3-clause license]
This software is released under the [BSD 3-clause license].

[contributors]: https://github.com/bugst/go-serial/graphs/contributors
[BSD 3-clause license]: https://github.com/bugst/go-serial/blob/master/LICENSE
Expand Down
10 changes: 5 additions & 5 deletions .licenses/serial-monitor/go/go.bug.st/serial/unixutils.dep.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: go.bug.st/serial/unixutils
version: v1.6.2
version: v1.6.3
type: go
summary:
homepage: https://pkg.go.dev/go.bug.st/serial/unixutils
license: bsd-3-clause
licenses:
- sources: serial@v1.6.2/LICENSE
- sources: serial@v1.6.3/LICENSE
text: |2+

Copyright (c) 2014-2023, Cristian Maglie.
Copyright (c) 2014-2024, Cristian Maglie.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -41,9 +41,9 @@ licenses:
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

- sources: serial@v1.6.2/README.md
- sources: serial@v1.6.3/README.md
text: |-
The software is release under a [BSD 3-clause license]
This software is released under the [BSD 3-clause license].

[contributors]: https://github.com/bugst/go-serial/graphs/contributors
[BSD 3-clause license]: https://github.com/bugst/go-serial/blob/master/LICENSE
Expand Down
63 changes: 0 additions & 63 deletions .licenses/serial-monitor/go/golang.org/x/exp/constraints.dep.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .licenses/serial-monitor/go/golang.org/x/exp/slices.dep.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: golang.org/x/exp/slices
version: v0.0.0-20240213143201-ec583247a57a
version: v0.0.0-20250305212735-054e65f0b394
type: go
summary: Package slices defines various functions useful with slices of any type.
homepage: https://pkg.go.dev/golang.org/x/exp/slices
license: bsd-3-clause
licenses:
- sources: exp@v0.0.0-20240213143201-ec583247a57a/LICENSE
- sources: exp@v0.0.0-20250305212735-054e65f0b394/LICENSE
text: |
Copyright (c) 2009 The Go Authors. All rights reserved.
Copyright 2009 The Go Authors.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand All @@ -20,7 +20,7 @@ licenses:
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

Expand All @@ -35,7 +35,7 @@ licenses:
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- sources: exp@v0.0.0-20240213143201-ec583247a57a/PATENTS
- sources: exp@v0.0.0-20250305212735-054e65f0b394/PATENTS
text: |
Additional IP Rights Grant (Patents)

Expand Down
10 changes: 5 additions & 5 deletions .licenses/serial-monitor/go/golang.org/x/sys/unix.dep.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: golang.org/x/sys/unix
version: v0.17.0
version: v0.31.0
type: go
summary: Package unix contains an interface to the low-level operating system primitives.
homepage: https://pkg.go.dev/golang.org/x/sys/unix
license: bsd-3-clause
licenses:
- sources: sys@v0.17.0/LICENSE
- sources: sys@v0.31.0/LICENSE
text: |
Copyright (c) 2009 The Go Authors. All rights reserved.
Copyright 2009 The Go Authors.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand All @@ -20,7 +20,7 @@ licenses:
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

Expand All @@ -35,7 +35,7 @@ licenses:
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- sources: sys@v0.17.0/PATENTS
- sources: sys@v0.31.0/PATENTS
text: |
Additional IP Rights Grant (Patents)

Expand Down
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
module github.com/arduino/serial-monitor

go 1.18
go 1.24.1

require (
github.com/arduino/pluggable-monitor-protocol-handler v0.9.2
go.bug.st/serial v1.6.2
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a
go.bug.st/serial v1.6.3
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
)

require (
github.com/creack/goselect v0.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/sys v0.31.0 // indirect
)
19 changes: 11 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
go.bug.st/serial v1.6.2 h1:kn9LRX3sdm+WxWKufMlIRndwGfPWsH1/9lCWXQCasq8=
go.bug.st/serial v1.6.2/go.mod h1:UABfsluHAiaNI+La2iESysd9Vetq7VRdpxvjx7CmmOE=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
go.bug.st/serial v1.6.3 h1:S3OG1bH+IDyokVndKrzwxI9ywiGBd8sWOn08dzSqEQI=
go.bug.st/serial v1.6.3/go.mod h1:nofMJxTeNVny/m6+KaafC6vJGj3miwQZ6vW4BZUGJPI=
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw=
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Loading