Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created by
brew bump
Created with
brew bump-formula-pr
.release notes
Although primitive operators are internal and aren't officially part of any stability guarantee, some libraries sometimes need to resort to using them, when there's no equivalent in the stdlib. Nickel 1.7 had a big primop refactoring, amounting mostly to renaming. If you're using primops, please look at the corresponding pull request
The behavior of destructuring has been changed to match exactly the behavior of pattern matching. While there should be no difference on well-behaving programs, this change makes destructuring stricter and can lead to some programs that were running fine before 1.7 to now fail with
unmatched pattern
. The typical example is when destructuring a record with a field that is not present:let {x,y, ..} = import "lib.ncl" in
. Ifx
is absent from thelib.ncl
but is never used anywhere, this used to work fine before 1.7 (the error would only trigger upon usage ofx
) but will now fail eagerly.If you need to fix a large codebase with long import destructuring chains and you don't know which fields are the offending ones, one possible technique is to open the importing file in an editor and use the
goto definition
command of the NLS on each field of a faulty pattern. If it works, the field is present, but if it doesn't, the field might be faulty. You can also apply a record contract mimicking the structure of the pattern to theimport "..."
expression to get better error reporting.Core language
1
,null
,"a"
, etc.), arraypatterns (
[fst, snd, ..tail]
), pattern guards ('Foo x if std.is_number x
), wildcard patterns (_
placeholder) and or-patterns (('Foo x) or ('Bar x) or ('Baz x)
): (see the syntax section of the manual for more details)Stdlib
record.get_or
to get value from record supplying default value by @olorin37 in Add get value from record with supplying default tweag/nickel#1920record.get_or
failing on field without definition by @yannham in [Fix] Avoidrecord.get_or
failing on field without definition tweag/nickel#1946array.at_or
by @olorin37 in Add stdlib function array.at_or tweag/nickel#1927std.enum.(from/to)_tag_and_arg
andstd.enum.map
to dynamically decompose and recompose an enum by @yannham in Add from/to_tag_and_arg tweag/nickel#1939std.test
module withAssert
andassert_all
function to testing by @ajbt200128 in chore: add assert to the stdlib tweag/nickel#1914Documentation
LSP
Tooling
nickel xxx
command to be JSON, YAML or TOML as well by @olorin37 in Remove different behaviour when single input tweag/nickel#1902New Contributors
Full Changelog: tweag/nickel@1.6.0...1.7.0