Skip to content

Commit

Permalink
Fixed charset handling in reader for dep files
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Oct 15, 2024
1 parent 210478f commit 2d75c0d
Showing 1 changed file with 57 additions and 42 deletions.
99 changes: 57 additions & 42 deletions internal/arduino/builder/internal/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package utils

import (
"internal/goos"

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-outdated (./)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-outdated (./)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-formatting (./)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-formatting (./)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-license-headers (./)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-license-headers (./)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-easyjson-generated-files

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-easyjson-generated-files

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-deps

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-deps

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-cache

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / check-cache

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / links

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / links

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, board)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, board)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, board)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, core)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, core)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, core)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, lib)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, lib)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, lib)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, debug)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, debug)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, debug)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, cache)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, cache)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, cache)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, monitor)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, monitor)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, monitor)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, completion)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, completion)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, completion)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_2)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_2)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_2)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_1)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_1)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_1)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, daemon)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, daemon)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, daemon)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, outdated)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, outdated)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, outdated)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, profiles)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, profiles)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, profiles)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, main)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, config)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, main)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, config)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, main)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, config)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_4)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_4)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_4)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_3)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_3)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, compile_3)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, update)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, update)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, update)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, sketch)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, sketch)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, sketch)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, upgrade)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, upgrade)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, upgrade)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, cache)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, cache)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, cache)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, upload_mock)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, upload_mock)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, upload_mock)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_1)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_1)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_1)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, upload)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, upload)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (ubuntu-latest, upload)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, board)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, board)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, board)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_3)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_3)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_3)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_4)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_4)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_4)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, completion)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, completion)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, completion)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_2)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_2)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, compile_2)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, core)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, core)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, core)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, config)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, config)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, config)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, daemon)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, daemon)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, daemon)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_2)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_2)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_2)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, profiles)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, profiles)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, profiles)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_1)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_1)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_1)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, debug)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, debug)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, debug)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, lib)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, lib)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, lib)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, main)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, main)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, main)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, monitor)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, monitor)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, monitor)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, outdated)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, outdated)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, outdated)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, lib)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, lib)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, lib)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, debug)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, debug)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, debug)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, main)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, main)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, main)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, sketch)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, sketch)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, sketch)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, outdated)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, outdated)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, outdated)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, profiles)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, profiles)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, profiles)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, update)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, update)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, update)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, daemon)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, daemon)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, daemon)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, upgrade)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, upgrade)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, upgrade)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, update)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, update)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, update)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_4)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_4)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_4)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, core)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, core)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, core)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, completion)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, completion)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, completion)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, board)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, board)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, board)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, upload_mock)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, upload_mock)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, upload_mock)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, cache)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, cache)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, cache)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, upload_mock)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, upload_mock)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, upload_mock)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, monitor)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, monitor)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, monitor)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_3)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_3)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, compile_3)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, upload)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, upload)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (macos-latest, upload)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, config)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, config)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, config)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, sketch)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, sketch)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, sketch)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, upload)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, upload)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, upload)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, upgrade)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, upgrade)

use of internal package internal/goos not allowed

Check failure on line 19 in internal/arduino/builder/internal/utils/utils.go

View workflow job for this annotation

GitHub Actions / test-integration (windows-latest, upgrade)

use of internal package internal/goos not allowed
"os"
"strings"
"unicode"
Expand Down Expand Up @@ -96,57 +97,71 @@ func ObjFileIsUpToDate(sourceFile, objectFile, dependencyFile *paths.Path) (bool
return f.Filter(rows, f.NotEquals("")), nil
}

rows, err := readDepFileWithEncoding(nil)
if err != nil {
logrus.Debugf("Could not read dependency file: %s", dependencyFile)
return false, err
}
if len(rows) == 0 {
return true, nil
}

firstRow := rows[0]
if !strings.HasSuffix(firstRow, ":") {
logrus.Debugf("No colon in first line of depfile")
return false, nil
}
objFileInDepFile := firstRow[:len(firstRow)-1]
if objFileInDepFile != objectFile.String() {
logrus.Debugf("Depfile is about different object file: %v", objFileInDepFile)
return false, nil
}

// The first line of the depfile contains the path to the object file to generate.
// The second line of the depfile contains the path to the source file.
// All subsequent lines contain the header files necessary to compile the object file.

// If we don't do this check it might happen that trying to compile a source file
// that has the same name but a different path wouldn't recreate the object file.
if sourceFile.String() != strings.Trim(rows[1], " ") {
logrus.Debugf("Depfile is about different source file: %v", strings.Trim(rows[1], " "))
return false, nil
}
checkDepFileWithEncoding := func(mapping *charmap.Charmap) (bool, error) {
rows, err := readDepFileWithEncoding(mapping)
if err != nil {
logrus.Debugf("Could not read dependency file: %s", dependencyFile)
return false, err
}
if len(rows) == 0 {
return true, nil
}

rows = rows[1:]
for _, row := range rows {
depStat, err := os.Stat(row)
if err != nil && !os.IsNotExist(err) {
// There is probably a parsing error of the dep file
// Ignore the error and trigger a full rebuild anyway
logrus.WithError(err).Debugf("Failed to read: %v", row)
firstRow := rows[0]
if !strings.HasSuffix(firstRow, ":") {
logrus.Debugf("No colon in first line of depfile")
return false, nil
}
if os.IsNotExist(err) {
logrus.Debugf("Not found: %v", row)
objFileInDepFile := firstRow[:len(firstRow)-1]
if objFileInDepFile != objectFile.String() {
logrus.Debugf("Depfile is about different object file: %v", objFileInDepFile)
return false, nil
}
if depStat.ModTime().After(objectFileStat.ModTime()) {
logrus.Debugf("%v newer than %v", row, objectFile)

// The first line of the depfile contains the path to the object file to generate.
// The second line of the depfile contains the path to the source file.
// All subsequent lines contain the header files necessary to compile the object file.

// If we don't do this check it might happen that trying to compile a source file
// that has the same name but a different path wouldn't recreate the object file.
if sourceFile.String() != strings.Trim(rows[1], " ") {
logrus.Debugf("Depfile is about different source file: %v", strings.Trim(rows[1], " "))
return false, nil
}

rows = rows[1:]
for _, row := range rows {
depStat, err := os.Stat(row)
if err != nil && !os.IsNotExist(err) {
// There is probably a parsing error of the dep file
// Ignore the error and trigger a full rebuild anyway
logrus.WithError(err).Debugf("Failed to read: %v", row)
return false, nil
}
if os.IsNotExist(err) {
logrus.Debugf("Not found: %v", row)
return false, nil
}
if depStat.ModTime().After(objectFileStat.ModTime()) {
logrus.Debugf("%v newer than %v", row, objectFile)
return false, nil
}
}

return true, nil
}

return true, nil
// This is required because on Windows we don't know which enconding is used
// by gcc to write the dep file (it could be UTF-8 or any of the Windows
// default mappings. Would ISO8859_1 be enough? Or we should differentiate the
// various ISO8859_XX based on selected locale? Only time will tell...).
if goos.GOOS == "windows" {
if upToDate, err := checkDepFileWithEncoding(charmap.ISO8859_1); err != nil {
return upToDate, nil
}
// Fallback to UTF-8...
}
return checkDepFileWithEncoding(nil)
}

func removeEndingBackSlash(s string) string {
Expand Down

0 comments on commit 2d75c0d

Please sign in to comment.