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

Error message resolving passed arguments with the wrong name #83

Closed
lihaoyi-databricks opened this issue Jul 18, 2020 · 0 comments · Fixed by #97
Closed

Error message resolving passed arguments with the wrong name #83

lihaoyi-databricks opened this issue Jul 18, 2020 · 0 comments · Fixed by #97
Assignees
Labels
bug Something isn't working

Comments

@lihaoyi-databricks
Copy link
Contributor

lihaoyi-databricks commented Jul 18, 2020

What is the issue?

When invoking a function imported from a different file with too many arguments, and at least one of the passed arguments is named, the error message is using the function name instead of the named argument to resolve the string template.

How to reproduce?

  1. Create a file bar.jsonnet with the following content:
function(x) x
  1. Create a second jsonnet file named foo.jsonnet with the following content:
local f = import "bar.jsonnet";
f(1, x = 2)
  1. Run ./mill "sjsonnet[2.13.3]".jvm.run foo.jsonnet
  2. Expected result:
$ ./sjsonnet.jar foo.jsonnet
sjsonnet.Error: Function parameter x passed more than once
    at .(foo.jsonnet:2:2)
    at .(foo.jsonnet:2:2)
  1. Actual result:
$ ./sjsonnet.jar foo.jsonnet
sjsonnet.Error: Function parameter f passed more than once
    at .(foo.jsonnet:2:2)
    at .(foo.jsonnet:2:2)
@lihaoyi-databricks lihaoyi-databricks changed the title Wrong error message calling function in other file Wrong error message calling function in other file with wrong arguments Jul 18, 2020
@edsilfer edsilfer changed the title Wrong error message calling function in other file with wrong arguments Error message resolving passed arguments with the wrong name Nov 9, 2020
@edsilfer edsilfer self-assigned this Nov 9, 2020
@edsilfer edsilfer added the bug Something isn't working label Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants