breezy-shampoo-44905
07/16/2024, 11:54 AMpants tailor ::
i always geht the following error:
*[main][~/src/go-repo]$ pants tailor ::
13:53:20.06 [INFO] waiting for pantsd to start...
13:53:21.37 [INFO] pantsd started
13:53:21.92 [INFO] Initializing scheduler...
13:53:22.34 [INFO] Scheduler initialized.
13:53:22.58 [ERROR] 1 Exception encountered:
Engine traceback:
in `tailor` goal
IncompleteJSONError: Incomplete JSON content
Any idea what could be wrong? Ah, i am using Go 1.22.4wide-midnight-78598
07/16/2024, 11:56 AM-ldebug
?
Maybe it'll show the file that is causing thiswide-midnight-78598
07/16/2024, 11:58 AMbreezy-shampoo-44905
07/16/2024, 12:01 PMbreezy-shampoo-44905
07/16/2024, 12:01 PMbreezy-shampoo-44905
07/16/2024, 12:01 PM13:59:45.26 [DEBUG] Completed: Determine Go SDK metadata for /usr/bin/go
13:59:45.26 [DEBUG] Completed: Scheduling: Determine Go SDK metadata for /usr/bin/go
13:59:45.26 [DEBUG] Completed: Find Go binary
13:59:45.26 [DEBUG] Completed: Scheduling: Parse apps/sharedenv-vm/go.mod
13:59:45.27 [DEBUG] Completed: Scheduling: Analyze Go module dependencies.
13:59:45.29 [DEBUG] Completed: Scheduling: Ask Go for its available import paths
13:59:45.29 [DEBUG] Completed: Analyze Go standard library packages.
13:59:45.30 [DEBUG] Completed: Download and analyze all third-party Go packages
13:59:45.30 [DEBUG] Completed: Generate `go_third_party_package` targets from `go_mod` target
13:59:45.30 [DEBUG] Completed: Find all sources from input specs
13:59:45.30 [DEBUG] Completed: `tailor` goal
13:59:45.30 [DEBUG] computed 1 nodes in 0.238858 seconds. there are 184 total nodes.
13:59:45.30 [ERROR] 1 Exception encountered:
Engine traceback:
in `tailor` goal
IncompleteJSONError: Incomplete JSON content
breezy-shampoo-44905
07/16/2024, 12:04 PM--print-stacktrace
it shows the following:
File "/home/sja/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
result = yield self
File "/home/sja/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/backend/go/util_rules/import_analysis.py", line 75, in analyze_go_stdlib_packages
for pkg_json in ijson.items(list_result.stdout, "", multiple_values=True):
File "/home/sja/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.21.0/lib/python3.9/site-packages/ijson/utils.py", line 55, in coros2gen
f.send(value)
File "/home/sja/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.21.0/lib/python3.9/site-packages/ijson/backends/python.py", line 46, in utf8_encoder
target.close()
File "/home/sja/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.21.0/lib/python3.9/site-packages/ijson/backends/python.py", line 116, in Lexer
target.send(EOF)
File "/home/sja/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.21.0/lib/python3.9/site-packages/ijson/backends/python.py", line 161, in parse_value
raise common.IncompleteJSONError('Incomplete JSON content')
ijson.common.IncompleteJSONError: Incomplete JSON content
so it seems again related to this ijson stuffwide-midnight-78598
07/16/2024, 12:07 PMcommand=("list", *maybe_race_arg, "-json", "std"),
Does this command make sense, and is it something you could run at the root of your project to see what gets generated?
go list -json std
?
And conditionally with CGO_ENABLED=1
breezy-shampoo-44905
07/16/2024, 12:13 PMgo list std
outputs nothing, e.g.
*[main][~/src/go-repo/apps/pipeman]$ go list std
go: warning: "std" matched no packages
wide-midnight-78598
07/16/2024, 12:15 PMgo list -json
appears to be necessary for ijson to analyze imports
If it's related to go list
(again I've never used Go), then we should at least have a better errorbreezy-shampoo-44905
07/16/2024, 12:23 PMbreezy-shampoo-44905
07/16/2024, 12:35 PM