Skip to content

sjsonnet accepts duplicate local variables whereas jsonnet doesn't #178

@zapster

Description

@zapster

See the following jsonnet file:

$ cat duplicate_local.jsonnet
{
  local var = ['foo'],
  local var = var + ['bar'],
  var: var,
}

The jsonnet reference implementation complains:

$ jsonnet duplicate_local.jsonnet
duplicate_local.jsonnet:3:9-12 Duplicate local var: var

  local var = var + ['bar'],

However, sjsonnet happily accepts it:

$ sjsonnet duplicate_local.jsonnet
{
   "var": [
      "foo",
      "bar"
   ]
}

Independent of what makes more sense, I think sjsonnet should behave the same as jsonnet.

Jsonnet commandline interpreter v0.17.0
Sjsonnet 0.4.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions