bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
22.98k stars 4.03k forks source link

ctx.actions.run error message doesn't match args #6581

Closed mprobst closed 3 years ago

mprobst commented 5 years ago

Description of the problem / feature request:

Calling ctx.actions.run(data = [...]) give this error message:

unexpected keyword 'data', in method call run(File executable, string progress_message, list data, depset inputs, list outputs, list arguments) of 'actions'

See how it suggests run has an argument list data. That's super confusing.

https://docs.bazel.build/versions/master/skylark/lib/actions.html#run

Feature requests: what underlying problem are you trying to solve with this feature?

Docs/confusing error message.

What's the output of bazel info release?

$ bazel info release
release 0.19.0
laurentlb commented 5 years ago

I'm confused, where do you see list data?

mprobst commented 5 years ago

It's in the error message, in the list of function parameters.

laurentlb commented 5 years ago

Ah, I see. I think the line shows your call (and not the definition of the method).

mprobst commented 5 years ago

Well, that's quite confusing :-)

laurentlb commented 5 years ago

@c-parsons Now that we don't have method overloading anymore, it should be easier to get the method signature and show it there.

brandjon commented 3 years ago

Error is currently:

Error in run: run() got unexpected keyword argument 'data'