Skip to content

Binary Provisioning: improve script syntax error reporting during dependency analysis #5104

@pablochacin

Description

@pablochacin

When running a test with syntax errors, the dependency analysis fails, but the error message received by the user may be confusing because it refers to the automatic dependency resolution.

cat <<EOF | k6 run - 
export default function() {
          console.log('hello world'
}
> EOF
ERRO[0000] Automatic extension resolution is enabled but it failed to analyze the dependencies. Please, make sure to report this issue by opening a bug report.  error="-:3:2 Expected \")\" but found \"}\""
ERRO[0000] -:3:2 Expected ")" but found "}"

With the automatic extension resolution disabled, the error message is:

ERRO[0000] GoError: file:///-: Line 3:3 Unexpected token } (and 1 more errors)  hint="script exception

It would be preferable the error message were more specific to the root cause.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions