Skip to content

Commit

Permalink
Fix up transcripts which mention __projects
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPenner committed Jun 26, 2024
1 parent 7122d59 commit 2cb85ae
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 87 deletions.
25 changes: 0 additions & 25 deletions unison-src/transcripts-using-base/namespace-dependencies.output.md

This file was deleted.

6 changes: 3 additions & 3 deletions unison-src/transcripts/add-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ main = '5
```

```ucm
scratch/main> run main
scratch/main> add.run .an.absolute.name
scratch/main> view .an.absolute.name
.> run main
.> add.run .an.absolute.name
.> view .an.absolute.name
```
12 changes: 5 additions & 7 deletions unison-src/transcripts/add-run.output.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,21 +290,19 @@ main = '5
```
```ucm
scratch/main> run main
.> run main
5
scratch/main> add.run .an.absolute.name
.> add.run .an.absolute.name
⍟ I've added these definitions:
.an.absolute.name : Nat
scratch/main> view .an.absolute.name
.> view .an.absolute.name
.__projects._184d2977_a0ad_4969_9ec6_6c49b9f2cb01.branches._9f1d1b83_958a_42b7_a36c_7178447a7820.an.absolute.name :
Nat
.__projects._184d2977_a0ad_4969_9ec6_6c49b9f2cb01.branches._9f1d1b83_958a_42b7_a36c_7178447a7820.an.absolute.name =
5
.an.absolute.name : Nat
.an.absolute.name = 5
```
8 changes: 4 additions & 4 deletions unison-src/transcripts/api-find.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ scratch/main> add

```api
-- Namespace segment prefix search
GET /api/non-project-code/find?query=http
GET /api/projects/scratch/branches/main/find?query=http
-- Namespace segment suffix search
GET /api/non-project-code/find?query=Server
GET /api/projects/scratch/branches/main/find?query=Server
-- Substring search
GET /api/non-project-code/find?query=lesys
GET /api/projects/scratch/branches/main/find?query=lesys
-- Cross-segment search
GET /api/non-project-code/find?query=joey.http
GET /api/projects/scratch/branches/main/find?query=joey.http
```
40 changes: 18 additions & 22 deletions unison-src/transcripts/api-find.output.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ scratch/main> add
```
```api
-- Namespace segment prefix search
GET /api/non-project-code/find?query=http
GET /api/projects/scratch/branches/main/find?query=http
[
[
{
"result": {
"segments": [
{
"contents": "__projects._4fce1d94_a201_41dc_a510_587d6a61186d.branches._d229dbff_a479_40a3_82f9_17fa36448d18.ross.",
"contents": "ross.",
"tag": "Gap"
},
{
Expand All @@ -56,14 +56,14 @@ GET /api/non-project-code/find?query=http
}
]
},
"score": 170
"score": 156
},
{
"contents": {
"bestFoundTermName": "y",
"namedTerm": {
"termHash": "#emomp74i93h6ps0b5sukke0tci0ooba3f9jk21qm919a7act9u7asani84c0mqbdk4lcjrdvr9olpedp23p6df78r4trqlg0cciadc8",
"termName": "__projects._4fce1d94_a201_41dc_a510_587d6a61186d.branches._d229dbff_a479_40a3_82f9_17fa36448d18.ross.httpClient.y",
"termName": "ross.httpClient.y",
"termTag": "Plain",
"termType": [
{
Expand All @@ -84,7 +84,7 @@ GET /api/non-project-code/find?query=http
"result": {
"segments": [
{
"contents": "__projects._4fce1d94_a201_41dc_a510_587d6a61186d.branches._d229dbff_a479_40a3_82f9_17fa36448d18.joey.",
"contents": "joey.",
"tag": "Gap"
},
{
Expand All @@ -97,14 +97,14 @@ GET /api/non-project-code/find?query=http
}
]
},
"score": 170
"score": 156
},
{
"contents": {
"bestFoundTermName": "z",
"namedTerm": {
"termHash": "#a84tg4er4kfl9k2p250vp2o1dsp5kmn9a7q8g2bo723qbtbf9sagrl28fa4q0j5f2cv4alsjik6rf487ss646qt95gbm3dd13k7e1fo",
"termName": "__projects._4fce1d94_a201_41dc_a510_587d6a61186d.branches._d229dbff_a479_40a3_82f9_17fa36448d18.joey.httpServer.z",
"termName": "joey.httpServer.z",
"termTag": "Plain",
"termType": [
{
Expand All @@ -122,14 +122,14 @@ GET /api/non-project-code/find?query=http
]
]
-- Namespace segment suffix search
GET /api/non-project-code/find?query=Server
GET /api/projects/scratch/branches/main/find?query=Server
[
[
{
"result": {
"segments": [
{
"contents": "__projects._4fce1d94_a201_41dc_a510_587d6a61186d.branches._d229dbff_a479_40a3_82f9_17fa36448d18.joey.http",
"contents": "joey.http",
"tag": "Gap"
},
{
Expand All @@ -142,14 +142,14 @@ GET /api/non-project-code/find?query=Server
}
]
},
"score": 230
"score": 223
},
{
"contents": {
"bestFoundTermName": "z",
"namedTerm": {
"termHash": "#a84tg4er4kfl9k2p250vp2o1dsp5kmn9a7q8g2bo723qbtbf9sagrl28fa4q0j5f2cv4alsjik6rf487ss646qt95gbm3dd13k7e1fo",
"termName": "__projects._4fce1d94_a201_41dc_a510_587d6a61186d.branches._d229dbff_a479_40a3_82f9_17fa36448d18.joey.httpServer.z",
"termName": "joey.httpServer.z",
"termTag": "Plain",
"termType": [
{
Expand All @@ -167,14 +167,14 @@ GET /api/non-project-code/find?query=Server
]
]
-- Substring search
GET /api/non-project-code/find?query=lesys
GET /api/projects/scratch/branches/main/find?query=lesys
[
[
{
"result": {
"segments": [
{
"contents": "__projects._4fce1d94_a201_41dc_a510_587d6a61186d.branches._d229dbff_a479_40a3_82f9_17fa36448d18.rachel.fi",
"contents": "rachel.fi",
"tag": "Gap"
},
{
Expand All @@ -187,14 +187,14 @@ GET /api/non-project-code/find?query=lesys
}
]
},
"score": 185
"score": 175
},
{
"contents": {
"bestFoundTermName": "x",
"namedTerm": {
"termHash": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
"termName": "__projects._4fce1d94_a201_41dc_a510_587d6a61186d.branches._d229dbff_a479_40a3_82f9_17fa36448d18.rachel.filesystem.x",
"termName": "rachel.filesystem.x",
"termTag": "Plain",
"termType": [
{
Expand All @@ -212,16 +212,12 @@ GET /api/non-project-code/find?query=lesys
]
]
-- Cross-segment search
GET /api/non-project-code/find?query=joey.http
GET /api/projects/scratch/branches/main/find?query=joey.http
[
[
{
"result": {
"segments": [
{
"contents": "__projects._4fce1d94_a201_41dc_a510_587d6a61186d.branches._d229dbff_a479_40a3_82f9_17fa36448d18.",
"tag": "Gap"
},
{
"contents": "joey.http",
"tag": "Match"
Expand All @@ -232,14 +228,14 @@ GET /api/non-project-code/find?query=joey.http
}
]
},
"score": 333
"score": 300
},
{
"contents": {
"bestFoundTermName": "z",
"namedTerm": {
"termHash": "#a84tg4er4kfl9k2p250vp2o1dsp5kmn9a7q8g2bo723qbtbf9sagrl28fa4q0j5f2cv4alsjik6rf487ss646qt95gbm3dd13k7e1fo",
"termName": "__projects._4fce1d94_a201_41dc_a510_587d6a61186d.branches._d229dbff_a479_40a3_82f9_17fa36448d18.joey.httpServer.z",
"termName": "joey.httpServer.z",
"termTag": "Plain",
"termType": [
{
Expand Down
18 changes: 9 additions & 9 deletions unison-src/transcripts/bug-strange-closure.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

```ucm:hide
scratch/main> builtins.mergeio
scratch/main> load unison-src/transcripts-using-base/doc.md.files/syntax.u
.> builtins.mergeio
.> load unison-src/transcripts-using-base/doc.md.files/syntax.u
```

We can display the guide before and after adding it to the codebase:

```ucm
scratch/main> display doc.guide
scratch/main> add
scratch/main> display doc.guide
.> display doc.guide
.> add
.> display doc.guide
```

But we can't display this due to a decompilation problem.
Expand All @@ -19,10 +19,10 @@ rendered = Pretty.get (docFormatConsole doc.guide)
```

```ucm
scratch/main> display rendered
scratch/main> add
scratch/main> display rendered
scratch/main> undo
.> display rendered
.> add
.> display rendered
.> undo
```

And then this sometimes generates a GHC crash "strange closure error" but doesn't seem deterministic.
Expand Down
20 changes: 8 additions & 12 deletions unison-src/transcripts/bug-strange-closure.output.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
We can display the guide before and after adding it to the codebase:

```ucm
scratch/main> display doc.guide
.> display doc.guide
# Unison computable documentation
Expand Down Expand Up @@ -200,7 +200,7 @@ scratch/main> display doc.guide
rendered table.
Some text More text Zounds!

scratch/main> add
.> add

⍟ I've added these definitions:

Expand All @@ -213,7 +213,7 @@ scratch/main> add
otherElements : Doc2
sqr : Nat -> Nat

scratch/main> display doc.guide
.> display doc.guide

# Unison computable documentation

Expand Down Expand Up @@ -432,7 +432,7 @@ rendered = Pretty.get (docFormatConsole doc.guide)
```
```ucm
scratch/main> display rendered
.> display rendered
# Unison computable documentation
Expand Down Expand Up @@ -630,13 +630,13 @@ scratch/main> display rendered
rendered table.
Some text More text Zounds!

scratch/main> add
.> add

⍟ I've added these definitions:

rendered : Annotated () (Either SpecialForm ConsoleText)

scratch/main> display rendered
.> display rendered

# Unison computable documentation

Expand Down Expand Up @@ -834,17 +834,13 @@ scratch/main> display rendered
rendered table.
Some text More text Zounds!

scratch/main> undo
.> undo

Here are the changes I undid

Added definitions:

1. __projects._567e16f7_c03b_4435_9ed7_2845d81ba835.branches._b666e957_74dc_4635_9d58_9ed04d0d29c9.rendered : Annotated
( )
(Either
SpecialForm
ConsoleText)
1. rendered : Annotated () (Either SpecialForm ConsoleText)

```
And then this sometimes generates a GHC crash "strange closure error" but doesn't seem deterministic.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,15 @@ id2 x =
⍟ These new definitions are ok to `add`:
id : x -> x
(also named
__projects._c5503e83_aeeb_41a5_a993_a5710c894730.branches._760add7e_4d96_4853_9fd0_7461aa7775ee.id)
id2 : x -> x
```
```ucm
scratch/main> add
⊡ Ignored previously added definitions: id
⍟ I've added these definitions:
id : x -> x
id2 : x -> x
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# namespace.dependencies command

```unison:hide
const a b = a
external.mynat = 1
mynamespace.dependsOnText = external.mynat Nat.+ 10
mynamespace.dependsOnText = const external.mynat 10
```

```ucm
Expand Down
Loading

0 comments on commit 2cb85ae

Please sign in to comment.