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

manual/modular-configurations.md: add argument to std.string.join #1859

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

Jasha10
Copy link
Contributor

@Jasha10 Jasha10 commented Mar 15, 2024

This is another change related to the final example in doc/manual/modular-configurations.md.
The std.string.join function takes two arguments.

Before this change:

$ echo '(import "example.ncl") & {inputs = {foo = "Phooey", bar = 123}}' | nickel export
error: non serializable term
   ┌─ <stdlib/internals.ncl>:44:7
   │
44 │ ╭       (
45 │ │         fun x =>
46 │ │           value
47 │ │             (
   · │
52 │ │             )
53 │ │       )
   │ ╰───────^
   │
   = Nickel only supports serializing to and from strings, booleans, numbers, enum tags, `null` (depending on the format), as well as records and arrays of serializable values.
   = Functions and special values (such as contract labels) aren't serializable.
   = If you want serialization to ignore a specific value, please use the `not_exported` metadata.

After this change:

$ echo '(import "example.ncl") & {inputs = {foo = "Phooey", bar = 123}}' | nickel export
{
  "last_option": "values are phooey and 123",
  "other_option": "Hello phooey",
  "some_config_option": 124
}

Copy link
Contributor

@vkleen vkleen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@vkleen vkleen added this pull request to the merge queue Mar 16, 2024
Merged via the queue into tweag:master with commit 112e829 Mar 16, 2024
4 checks passed
@vkleen
Copy link
Contributor

vkleen commented Mar 16, 2024

I've also backported this to the stable branch just now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants