Commit Graph

36 Commits

Author SHA1 Message Date
Rúnar
29981373ee Transcripts 2024-08-17 22:02:41 -04:00
Greg Pfeil
0031542faf
Add a space before code block info strings
This is for consistency with the `cmark` style. Now the blocks we still
pretty-print ourselves will match the bulk of them that `cmark`
produces.
2024-07-10 13:56:07 -06:00
Greg Pfeil
1dc181b99a
Update the transcripts with cmark
`cmark`’s pretty-printer matches our output pretty well, with a few differences:
- it puts a space between the fence and the info string for in code blocks;
- it prefers `-` over `*` for bulleted lists (as do I) and it indents them;
- it `\`-escapes certain chars very conservatively;
- it prefers indented/unfenced code blocks if there is no info string; and
- it prefers `*` over `_` (unlike any sane person).

This also shows how the change fixes a number of issues:
- fix2158-1.output.md also illustrates how this change fixes #1809;
- alias-many.output.md and input-parse-errors.output.md show how fenced
  code blocks without an info string would use the beginning of the
  content as the info string;
- transcripts-round-trip/main.output.md shows how output blocks for
  generated `unison` stanzas (which could contain nested fenced blocks)
  might not have long-enough fences; and
- error-messages.output.md and generic-parse-errors.output.md show how
  Unison errors were reported on the wrong line number (and thus the
  printed error lines were also incorrect).
2024-07-10 13:37:51 -06:00
Chris Penner
b6b2adb075 Resolve merge conflicts with trunk 2024-06-27 10:55:45 -07:00
Greg Pfeil
1a753ffb5b
Group test results by definition
Follow-up to #5140.
2024-06-26 23:40:16 -06:00
Greg Pfeil
fd197f1369
Update the transcript outputs 2024-06-26 14:45:49 -06:00
Chris Penner
5ca1eb3b8d Replace '.' references with scratch/main 2024-06-25 11:11:07 -07:00
Arya Irani
2cf96a36ae
deprecate cd, up; add find-in (#4883)
* deprecate `cd`, `up`, hide `reset-root`, add `find-in`, hides unimplemented `update.builtins`
Co-authored-by: Chris Penner <christopher.penner@gmail.com>
2024-04-28 21:30:02 -04:00
andrii
8b857b152c Adding a message for when ucm started reloading changes 2023-12-22 12:55:24 +01:00
Dan Doel
80c44ed5a1 Merge branch 'trunk' into captureAs 2023-11-30 13:40:57 -05:00
Dan Doel
37b3489c0f Add some new builtins for accessing sandbox information
- `Value.validateSandboxed` checks an interchange value for sandboxing
  before it is decoded. It either returns a list of dependencies the
  runtime doesn't know about yet, or a list of disallowed builtins, both
  as lists of termlinks
- `sandboxLinks` returns the list of sandboxed builtins transitively
  referenced by the code associated to a given termlink
2023-10-23 12:45:02 -04:00
Dan Doel
f9a8b6c956 Expected transcript changes: hashes 2023-09-07 16:09:09 -04:00
Rúnar
9797a0297f Added a transcript test 2023-06-15 15:19:45 -04:00
Stew O'Connor
5f8ef871ab use breakOn instead of indices which for Text.indexOf 2023-06-12 14:39:04 -07:00
Stew O'Connor
054cdd87de add Bytes.indexOf and Text.indexOf builtins
fixes #4060
2023-06-01 19:24:07 -07:00
Stew O'Connor
e231f80211 Add a new Pattern.captureAs builtin
Adding a Pattern.captureAs which will act just like capture, but
additionally takes an `a` which will be used as a replacement for the
capture.

My motivation for adding it is that I want to match on escape
sequence, but actually capture the unescaped character instead.

For example:

```
Pattern.captureAs "\n" (Pattern.literal "\\n")
```
2023-05-08 16:31:59 -07:00
Dan Doel
9e0e93135f Merge remote-tracking branch 'origin/trunk' into topic/builtins-misc 2023-01-26 10:30:05 -05:00
Fabio Labella
b09743a622 Generate transcripts 2023-01-25 02:35:18 +00:00
Fabio Labella
b5a6bb53e7 Name transcripts test for murmur hash 2023-01-25 02:18:25 +00:00
Fabio Labella
7b991456c3 Add transcript tests, currently broken: hash is nondeterministic 2023-01-25 02:18:25 +00:00
Dan Doel
7261823de1 Make Nat/Int.fromText return None for over/underflows 2023-01-24 14:37:34 -05:00
Dan Doel
884e966ad8 Make take/drop builtins behave better w.r.t large numbers 2022-12-20 11:29:02 -05:00
Dan Doel
ac95b57f7b Added back length comparison, but preferring lexicographic
- Just zipping the lists will report that any two lists with the same
  prefix are equal. So, instead, compare the lengths if the zip check
  reports equality.
- Added a few tests for list equality to builtins.md
2022-11-15 12:14:18 -05:00
Paul Chiusano
a4212e450b added transcript regression test 2022-10-26 09:27:12 -05:00
Rúnar
ff814dca00 Transcript to test 2022-10-13 11:27:26 -04:00
Paul Chiusano
0f1218f8fc moar tests! 2022-07-01 14:47:08 -04:00
Dan Doel
74017804fb Fixed calling convention of Pattern.or
Added a missing comma in test transcript
2022-07-01 14:07:19 -04:00
mergify[bot]
f344103545
Merge pull request #2929 from unisonweb/topic/fix2925
Fix universal equality
2022-02-18 16:09:44 +00:00
Rúnar
23e13958e6 Added test 2022-02-18 09:14:33 -05:00
Dan Doel
4b57560b85 Fix an issue computing sandbox info
The sandboxed dependencies for combinators were being computed just from
the previously known combinators. So, if multiple new, interrelated
combinators were introduced simultaneously, their full transitive
dependencies wouldn't take into account anything in the new set.

To fix this, just iterate the dependency inference until a fixed point
is reached.
2022-02-16 14:40:04 -05:00
Dan Doel
8c7941296d Move sandbox tests to builtins.md 2022-01-26 11:43:41 -05:00
Chris Penner
c87ae00964 Fix more infix combinator usages in transcripts 2021-12-15 16:38:51 -06:00
Dan Doel
8fb52bb7f4 Fixed some tags that were still 0 rather than reference packed 2021-11-02 16:56:50 -04:00
Paul Chiusano
26338d89df compression builtins 2021-08-13 20:10:44 -05:00
Paul Chiusano
5bc719944e Fix wildcard imports regression and re-add test for it 2021-08-04 10:42:35 -04:00
Paul Chiusano
41b8068b43 Fix name comparison to take into account absolute names
Transcripts all pass, but have a lot of diffs that I need to investigate
2021-08-01 17:49:24 -04:00