mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +03:00
Work on fixing some transcripts for projects
This commit is contained in:
parent
38d60e7e6e
commit
fce12cb8b7
@ -8,6 +8,8 @@ CREATE TABLE current_project_path (
|
||||
|
||||
foreign key (project_id, branch_id)
|
||||
references project_branch (project_id, branch_id)
|
||||
-- Prevent deleting the project you're currently in.
|
||||
on delete no action
|
||||
) WITHOUT ROWID;
|
||||
|
||||
DROP TABLE most_recent_namespace;
|
||||
|
@ -148,796 +148,13 @@ scratch/main> display term.doc
|
||||
```
|
||||
```api
|
||||
GET /api/projects/scratch/branches/main/getDefinition?names=term
|
||||
{
|
||||
"missingDefinitions": [],
|
||||
"termDefinitions": {
|
||||
"#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8": {
|
||||
"bestTermName": "term",
|
||||
"defnTermTag": "Plain",
|
||||
"signature": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
}
|
||||
],
|
||||
"termDefinition": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "term",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "term"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeAscriptionColon"
|
||||
},
|
||||
"segment": " :"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "term",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "term"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "BindingEquals"
|
||||
},
|
||||
"segment": " ="
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "NumericLiteral"
|
||||
},
|
||||
"segment": "42"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"termDocs": [
|
||||
[
|
||||
"doc",
|
||||
"#kjfaflbrgl89j2uq4ruubejakm6s02cp3m61ufu7rv7tkbd4nmkvcn1fciue53v0msir9t7ds111ab9er8qfa06gsa9ddfrdfgc99mo",
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Heading",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
[
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Heading",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "2",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
[
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Term",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "Link:",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#k5gpql9cbdfau6lf1aja24joc3sfctvjor8esu8bemn0in3l148otb0t3vebgqrt6qml302h62bbfeftg65gec1v8ouin5m6v2969d8",
|
||||
"tag": "TermReference"
|
||||
},
|
||||
"segment": "otherTerm"
|
||||
}
|
||||
],
|
||||
"tag": "Link"
|
||||
},
|
||||
"tag": "Special"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Type",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "Link:",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#nirp5os0q69o4e1u9p3t6mmq6l6otluefi3ksm7dhm0diidjvkkgl8o9bvnflbj0sanuvdusf34f1qrins3ktcaglpcqv9oums2slsg",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Maybe"
|
||||
}
|
||||
],
|
||||
"tag": "Link"
|
||||
},
|
||||
"tag": "Special"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Term",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "source:",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
{
|
||||
"contents": [
|
||||
"#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
|
||||
{
|
||||
"contents": [
|
||||
[
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
|
||||
"tag": "TermReference"
|
||||
},
|
||||
"segment": "term"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeAscriptionColon"
|
||||
},
|
||||
"segment": ": "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "term",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "term"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeAscriptionColon"
|
||||
},
|
||||
"segment": " :"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "term",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "term"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "BindingEquals"
|
||||
},
|
||||
"segment": " ="
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "NumericLiteral"
|
||||
},
|
||||
"segment": "42"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tag": "UserObject"
|
||||
}
|
||||
],
|
||||
"tag": "Term"
|
||||
}
|
||||
],
|
||||
"tag": "Source"
|
||||
},
|
||||
"tag": "Special"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Term",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "signature:",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
[
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
|
||||
"tag": "TermReference"
|
||||
},
|
||||
"segment": "term"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeAscriptionColon"
|
||||
},
|
||||
"segment": ": "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tag": "Signature"
|
||||
},
|
||||
"tag": "Special"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "List",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "item",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
}
|
||||
],
|
||||
"tag": "BulletedList"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
1,
|
||||
[
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Numbered",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "list",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "item",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tag": "NumberedList"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": ">",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "Block",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "quote",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Code",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "block",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Inline",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "code:",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "NumericLiteral"
|
||||
},
|
||||
"segment": "1"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat.+",
|
||||
"tag": "TermReference"
|
||||
},
|
||||
"segment": "Nat.+"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "NumericLiteral"
|
||||
},
|
||||
"segment": "2"
|
||||
}
|
||||
],
|
||||
"tag": "Example"
|
||||
},
|
||||
"tag": "Special"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": {
|
||||
"contents": "\"doesn't typecheck\" + 1",
|
||||
"tag": "Word"
|
||||
},
|
||||
"tag": "Code"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Link",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"contents": "https://unison-lang.org",
|
||||
"tag": "Word"
|
||||
},
|
||||
"tag": "Group"
|
||||
}
|
||||
],
|
||||
"tag": "NamedLink"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "![Image](https://share-next.unison-lang.org/static/unison-logo-circle.png)",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Bold",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
"tag": "Bold"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Italic",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
"tag": "Bold"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Strikethrough",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
"tag": "Strikethrough"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Horizontal",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "rule",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "---",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Table",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "Header",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "1",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "Header",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "2",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "--------",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "--------",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "Cell",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "1",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "Cell",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "2",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "Cell",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "3",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "Cell",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "4",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "|",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Video",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
[
|
||||
{
|
||||
"mediaSourceMimeType": null,
|
||||
"mediaSourceUrl": "test.mp4"
|
||||
}
|
||||
],
|
||||
{
|
||||
"poster": "test.png"
|
||||
}
|
||||
],
|
||||
"tag": "Video"
|
||||
},
|
||||
"tag": "Special"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Transclusion/evaluation:",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "This",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "doc",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "should",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "be",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "embedded.",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "message",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
}
|
||||
],
|
||||
"tag": "UntitledSection"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tag": "Section"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tag": "Section"
|
||||
}
|
||||
]
|
||||
],
|
||||
"termNames": [
|
||||
"term"
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeDefinitions": {}
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
🛑
|
||||
|
||||
The transcript failed due to an error in the stanza above. The error is:
|
||||
|
||||
Error decoding response from /api/projects/scratch/branches/main/getDefinition?names=term: Error in $: Failed reading: not a valid json value at 'QueryparameterrootBranchisrequired'
|
||||
|
@ -37,219 +37,23 @@ scratch/main> add
|
||||
```api
|
||||
-- Namespace segment prefix search
|
||||
GET /api/projects/scratch/branches/main/find?query=http
|
||||
[
|
||||
[
|
||||
{
|
||||
"result": {
|
||||
"segments": [
|
||||
{
|
||||
"contents": "ross.",
|
||||
"tag": "Gap"
|
||||
},
|
||||
{
|
||||
"contents": "http",
|
||||
"tag": "Match"
|
||||
},
|
||||
{
|
||||
"contents": "Client.y",
|
||||
"tag": "Gap"
|
||||
}
|
||||
]
|
||||
},
|
||||
"score": 156
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"bestFoundTermName": "y",
|
||||
"namedTerm": {
|
||||
"termHash": "#emomp74i93h6ps0b5sukke0tci0ooba3f9jk21qm919a7act9u7asani84c0mqbdk4lcjrdvr9olpedp23p6df78r4trqlg0cciadc8",
|
||||
"termName": "ross.httpClient.y",
|
||||
"termTag": "Plain",
|
||||
"termType": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "##Nat"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tag": "FoundTermResult"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"result": {
|
||||
"segments": [
|
||||
{
|
||||
"contents": "joey.",
|
||||
"tag": "Gap"
|
||||
},
|
||||
{
|
||||
"contents": "http",
|
||||
"tag": "Match"
|
||||
},
|
||||
{
|
||||
"contents": "Server.z",
|
||||
"tag": "Gap"
|
||||
}
|
||||
]
|
||||
},
|
||||
"score": 156
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"bestFoundTermName": "z",
|
||||
"namedTerm": {
|
||||
"termHash": "#a84tg4er4kfl9k2p250vp2o1dsp5kmn9a7q8g2bo723qbtbf9sagrl28fa4q0j5f2cv4alsjik6rf487ss646qt95gbm3dd13k7e1fo",
|
||||
"termName": "joey.httpServer.z",
|
||||
"termTag": "Plain",
|
||||
"termType": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "##Nat"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tag": "FoundTermResult"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
```api
|
||||
-- Namespace segment prefix search
|
||||
GET /api/projects/scratch/branches/main/find?query=http
|
||||
-- Namespace segment suffix search
|
||||
GET /api/projects/scratch/branches/main/find?query=Server
|
||||
[
|
||||
[
|
||||
{
|
||||
"result": {
|
||||
"segments": [
|
||||
{
|
||||
"contents": "joey.http",
|
||||
"tag": "Gap"
|
||||
},
|
||||
{
|
||||
"contents": "Server",
|
||||
"tag": "Match"
|
||||
},
|
||||
{
|
||||
"contents": ".z",
|
||||
"tag": "Gap"
|
||||
}
|
||||
]
|
||||
},
|
||||
"score": 223
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"bestFoundTermName": "z",
|
||||
"namedTerm": {
|
||||
"termHash": "#a84tg4er4kfl9k2p250vp2o1dsp5kmn9a7q8g2bo723qbtbf9sagrl28fa4q0j5f2cv4alsjik6rf487ss646qt95gbm3dd13k7e1fo",
|
||||
"termName": "joey.httpServer.z",
|
||||
"termTag": "Plain",
|
||||
"termType": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "##Nat"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tag": "FoundTermResult"
|
||||
}
|
||||
]
|
||||
]
|
||||
-- Substring search
|
||||
GET /api/projects/scratch/branches/main/find?query=lesys
|
||||
[
|
||||
[
|
||||
{
|
||||
"result": {
|
||||
"segments": [
|
||||
{
|
||||
"contents": "rachel.fi",
|
||||
"tag": "Gap"
|
||||
},
|
||||
{
|
||||
"contents": "lesys",
|
||||
"tag": "Match"
|
||||
},
|
||||
{
|
||||
"contents": "tem.x",
|
||||
"tag": "Gap"
|
||||
}
|
||||
]
|
||||
},
|
||||
"score": 175
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"bestFoundTermName": "x",
|
||||
"namedTerm": {
|
||||
"termHash": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
|
||||
"termName": "rachel.filesystem.x",
|
||||
"termTag": "Plain",
|
||||
"termType": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "##Nat"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tag": "FoundTermResult"
|
||||
}
|
||||
]
|
||||
]
|
||||
-- Cross-segment search
|
||||
GET /api/projects/scratch/branches/main/find?query=joey.http
|
||||
[
|
||||
[
|
||||
{
|
||||
"result": {
|
||||
"segments": [
|
||||
{
|
||||
"contents": "joey.http",
|
||||
"tag": "Match"
|
||||
},
|
||||
{
|
||||
"contents": "Server.z",
|
||||
"tag": "Gap"
|
||||
}
|
||||
]
|
||||
},
|
||||
"score": 300
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"bestFoundTermName": "z",
|
||||
"namedTerm": {
|
||||
"termHash": "#a84tg4er4kfl9k2p250vp2o1dsp5kmn9a7q8g2bo723qbtbf9sagrl28fa4q0j5f2cv4alsjik6rf487ss646qt95gbm3dd13k7e1fo",
|
||||
"termName": "joey.httpServer.z",
|
||||
"termTag": "Plain",
|
||||
"termType": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "##Nat"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tag": "FoundTermResult"
|
||||
}
|
||||
]
|
||||
]
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
🛑
|
||||
|
||||
The transcript failed due to an error in the stanza above. The error is:
|
||||
|
||||
Error decoding response from /api/projects/scratch/branches/main/find?query=http: Error in $: Failed reading: not a valid json value at 'QueryparameterrootBranchisrequired'
|
||||
|
@ -8,503 +8,21 @@ nested.names.x = 42
|
||||
```api
|
||||
-- Should NOT find names by suffix
|
||||
GET /api/projects/scratch/branches/main/getDefinition?names=x
|
||||
{
|
||||
"missingDefinitions": [
|
||||
"x"
|
||||
],
|
||||
"termDefinitions": {},
|
||||
"typeDefinitions": {}
|
||||
}
|
||||
-- Term names should strip relativeTo prefix.
|
||||
GET /api/projects/scratch/branches/main/getDefinition?names=names.x&relativeTo=nested
|
||||
{
|
||||
"missingDefinitions": [],
|
||||
"termDefinitions": {
|
||||
"#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8": {
|
||||
"bestTermName": "x",
|
||||
"defnTermTag": "Plain",
|
||||
"signature": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
}
|
||||
],
|
||||
"termDefinition": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "x",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "x"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeAscriptionColon"
|
||||
},
|
||||
"segment": " :"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "x",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "x"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "BindingEquals"
|
||||
},
|
||||
"segment": " ="
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "NumericLiteral"
|
||||
},
|
||||
"segment": "42"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"termDocs": [
|
||||
[
|
||||
"doc",
|
||||
"#ulr9f75rpcrv79d7sfo2ep2tvbntu3e360lfomird2bdpj4bnea230e8o5j0b9our8vggocpa7eck3pus14fcfajlttat1bg71t6rbg",
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Documentation",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
}
|
||||
]
|
||||
],
|
||||
"termNames": [
|
||||
"nested.names.x"
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeDefinitions": {}
|
||||
}
|
||||
-- Should find definitions by hash, names should be relative
|
||||
GET /api/projects/scratch/branches/main/getDefinition?names=%23qkhkl0n238&relativeTo=nested
|
||||
{
|
||||
"missingDefinitions": [],
|
||||
"termDefinitions": {
|
||||
"#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8": {
|
||||
"bestTermName": "x",
|
||||
"defnTermTag": "Plain",
|
||||
"signature": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
}
|
||||
],
|
||||
"termDefinition": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "x",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "x"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeAscriptionColon"
|
||||
},
|
||||
"segment": " :"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "x",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "x"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "BindingEquals"
|
||||
},
|
||||
"segment": " ="
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "NumericLiteral"
|
||||
},
|
||||
"segment": "42"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"termDocs": [
|
||||
[
|
||||
"doc",
|
||||
"#ulr9f75rpcrv79d7sfo2ep2tvbntu3e360lfomird2bdpj4bnea230e8o5j0b9our8vggocpa7eck3pus14fcfajlttat1bg71t6rbg",
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Documentation",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
}
|
||||
]
|
||||
],
|
||||
"termNames": [
|
||||
"nested.names.x"
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeDefinitions": {}
|
||||
}
|
||||
``````unison
|
||||
doctest.thing.doc = {{ The correct docs for the thing }}
|
||||
doctest.thing = "A thing"
|
||||
doctest.thingalias.doc = {{ Docs for the alias, should not be displayed }}
|
||||
doctest.thingalias = "A thing"
|
||||
doctest.otherstuff.thing.doc = {{ A doc for a different term with the same name, should not be displayed }}
|
||||
doctest.otherstuff.thing = "A different thing"
|
||||
|
||||
```
|
||||
|
||||
Only docs for the term we request should be returned, even if there are other term docs with the same suffix.
|
||||
|
||||
```api
|
||||
GET /api/projects/scratch/branches/main/getDefinition?names=thing&relativeTo=doctest
|
||||
{
|
||||
"missingDefinitions": [],
|
||||
"termDefinitions": {
|
||||
"#jksc1s5kud95ro5ivngossullt2oavsd41s3u48bch67jf3gknru5j6hmjslonkd5sdqs8mr8k4rrnef8fodngbg4sm7u6au564ekjg": {
|
||||
"bestTermName": "doctest.thing",
|
||||
"defnTermTag": "Plain",
|
||||
"signature": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
}
|
||||
],
|
||||
"termDefinition": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "doctest.thing",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "doctest.thing"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeAscriptionColon"
|
||||
},
|
||||
"segment": " :"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "doctest.thing",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "doctest.thing"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "BindingEquals"
|
||||
},
|
||||
"segment": " ="
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TextLiteral"
|
||||
},
|
||||
"segment": "\"A thing\""
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"termDocs": [
|
||||
[
|
||||
"doctest.thing.doc",
|
||||
"#t9qfdoiuskj4n9go8cftj1r83s43s3o7sppafm5vr0bq5feieb7ap0cie5ed2qsf9g3ig448vffhnajinq81pnnkila1jp2epa7f26o",
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "The",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "correct",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "docs",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "for",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "the",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "thing",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
}
|
||||
]
|
||||
],
|
||||
"termNames": [
|
||||
"doctest.thing",
|
||||
"doctest.thingalias"
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeDefinitions": {}
|
||||
}
|
||||
```If we request a doc, the api should return the source, but also the rendered doc should appear in the 'termDocs' list.
|
||||
-- Should NOT find names by suffix
|
||||
GET /api/projects/scratch/branches/main/getDefinition?names=x
|
||||
-- Term names should strip relativeTo prefix.
|
||||
GET /api/projects/scratch/branches/main/getDefinition?names=names.x&relativeTo=nested
|
||||
-- Should find definitions by hash, names should be relative
|
||||
GET /api/projects/scratch/branches/main/getDefinition?names=%23qkhkl0n238&relativeTo=nested
|
||||
```
|
||||
|
||||
```api
|
||||
GET /api/projects/scratch/branches/main/getDefinition?names=thing.doc&relativeTo=doctest
|
||||
{
|
||||
"missingDefinitions": [],
|
||||
"termDefinitions": {
|
||||
"#t9qfdoiuskj4n9go8cftj1r83s43s3o7sppafm5vr0bq5feieb7ap0cie5ed2qsf9g3ig448vffhnajinq81pnnkila1jp2epa7f26o": {
|
||||
"bestTermName": "doctest.thing.doc",
|
||||
"defnTermTag": "Doc",
|
||||
"signature": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#ej86si0ur1lsjade71dojr25phk9bbom9rdks6dltolos5tjivakujcriqe02npba53n9gd7tkh8bmv08ttjb9t35lq2ch5heshqcs0",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Doc2"
|
||||
}
|
||||
],
|
||||
"termDefinition": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "doctest.thing.doc",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "doctest.thing.doc"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeAscriptionColon"
|
||||
},
|
||||
"segment": " :"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#ej86si0ur1lsjade71dojr25phk9bbom9rdks6dltolos5tjivakujcriqe02npba53n9gd7tkh8bmv08ttjb9t35lq2ch5heshqcs0",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Doc2"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "doctest.thing.doc",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "doctest.thing.doc"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "BindingEquals"
|
||||
},
|
||||
"segment": " ="
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DocDelimiter"
|
||||
},
|
||||
"segment": "{{"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "The"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "correct"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "docs"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "for"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "the"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "thing"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DocDelimiter"
|
||||
},
|
||||
"segment": "}}"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"termDocs": [
|
||||
[
|
||||
"doctest.thing.doc",
|
||||
"#t9qfdoiuskj4n9go8cftj1r83s43s3o7sppafm5vr0bq5feieb7ap0cie5ed2qsf9g3ig448vffhnajinq81pnnkila1jp2epa7f26o",
|
||||
{
|
||||
"contents": [
|
||||
{
|
||||
"contents": "The",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "correct",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "docs",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "for",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "the",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "thing",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
}
|
||||
]
|
||||
],
|
||||
"termNames": [
|
||||
"doctest.thing.doc"
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeDefinitions": {}
|
||||
}
|
||||
```
|
||||
|
||||
🛑
|
||||
|
||||
The transcript failed due to an error in the stanza above. The error is:
|
||||
|
||||
Error decoding response from /api/projects/scratch/branches/main/getDefinition?names=x: Error in $: Failed reading: not a valid json value at 'QueryparameterrootBranchisrequired'
|
||||
|
@ -37,45 +37,13 @@ scratch/main> add
|
||||
```api
|
||||
-- Should find names by suffix
|
||||
GET /api/projects/scratch/branches/main/namespaces/nested.names
|
||||
{
|
||||
"fqn": "nested.names",
|
||||
"hash": "#6tnmlu9knsce0u2991u6fvcmf4v44fdf0aiqtmnq7mjj0gi5sephg3lf12iv3odr5rc7vlgq75ciborrd3625c701bdmdomia2gcm3o",
|
||||
"readme": {
|
||||
"contents": [
|
||||
{
|
||||
"contents": "Here's",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": "a",
|
||||
"tag": "Word"
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
{
|
||||
"contents": {
|
||||
"contents": [
|
||||
{
|
||||
"contents": "README",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
},
|
||||
"tag": "Bold"
|
||||
},
|
||||
{
|
||||
"contents": "!",
|
||||
"tag": "Word"
|
||||
}
|
||||
],
|
||||
"tag": "Join"
|
||||
},
|
||||
"tag": "Group"
|
||||
}
|
||||
],
|
||||
"tag": "Paragraph"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
🛑
|
||||
|
||||
The transcript failed due to an error in the stanza above. The error is:
|
||||
|
||||
Error decoding response from /api/projects/scratch/branches/main/namespaces/nested.names: Error in $: Failed reading: not a valid json value at 'QueryparameterrootBranchisrequired'
|
||||
|
@ -34,101 +34,17 @@ scratch/main> add
|
||||
```
|
||||
```api
|
||||
GET /api/projects/scratch/branches/main/list?namespace=nested.names
|
||||
{
|
||||
"namespaceListingChildren": [
|
||||
{
|
||||
"contents": {
|
||||
"termHash": "#ddmmatmmiqsts2ku0i02kntd0s7rvcui4nn1cusio8thp9oqhbtilvcnhen52ibv43kr5q83f5er5q9h56s807k17tnelnrac7cch8o",
|
||||
"termName": "readme",
|
||||
"termTag": "Doc",
|
||||
"termType": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#ej86si0ur1",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "#ej86si0ur1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tag": "TermObject"
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"termHash": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
|
||||
"termName": "x",
|
||||
"termTag": "Plain",
|
||||
"termType": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "##Nat"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tag": "TermObject"
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"namespaceHash": "#n1egracfeljprftoktbjcase2hs4f4p8idbhs5ujipl42agld1810hrq9t7p7ped16aagni2cm1fjcjhho770jh80ipthhmg0cnsur0",
|
||||
"namespaceName": "x",
|
||||
"namespaceSize": 1
|
||||
},
|
||||
"tag": "Subnamespace"
|
||||
}
|
||||
],
|
||||
"namespaceListingFQN": "nested.names",
|
||||
"namespaceListingHash": "#oms19b4f9s3c8tb5skeb8jii95ij35n3hdg038pu6rv5b0fikqe4gd7lnu6a1i6aq5tdh2opdo4s0sfrupvk6vfkr9lf0n752gbl8o0"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
```api
|
||||
GET /api/projects/scratch/branches/main/list?namespace=nested.names
|
||||
GET /api/projects/scratch/branches/main/list?namespace=names&relativeTo=nested
|
||||
{
|
||||
"namespaceListingChildren": [
|
||||
{
|
||||
"contents": {
|
||||
"termHash": "#ddmmatmmiqsts2ku0i02kntd0s7rvcui4nn1cusio8thp9oqhbtilvcnhen52ibv43kr5q83f5er5q9h56s807k17tnelnrac7cch8o",
|
||||
"termName": "readme",
|
||||
"termTag": "Doc",
|
||||
"termType": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#ej86si0ur1",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "#ej86si0ur1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tag": "TermObject"
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"termHash": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
|
||||
"termName": "x",
|
||||
"termTag": "Plain",
|
||||
"termType": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "##Nat"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tag": "TermObject"
|
||||
},
|
||||
{
|
||||
"contents": {
|
||||
"namespaceHash": "#n1egracfeljprftoktbjcase2hs4f4p8idbhs5ujipl42agld1810hrq9t7p7ped16aagni2cm1fjcjhho770jh80ipthhmg0cnsur0",
|
||||
"namespaceName": "x",
|
||||
"namespaceSize": 1
|
||||
},
|
||||
"tag": "Subnamespace"
|
||||
}
|
||||
],
|
||||
"namespaceListingFQN": "nested.names",
|
||||
"namespaceListingHash": "#oms19b4f9s3c8tb5skeb8jii95ij35n3hdg038pu6rv5b0fikqe4gd7lnu6a1i6aq5tdh2opdo4s0sfrupvk6vfkr9lf0n752gbl8o0"
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
🛑
|
||||
|
||||
The transcript failed due to an error in the stanza above. The error is:
|
||||
|
||||
Error decoding response from /api/projects/scratch/branches/main/list?namespace=nested.names: Error in $: Failed reading: not a valid json value at 'QueryparameterrootBranchisrequired'
|
||||
|
@ -24,803 +24,33 @@ structural ability Stream s where
|
||||
```api
|
||||
-- term
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary?name=nat
|
||||
{
|
||||
"displayName": "nat",
|
||||
"hash": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "Plain"
|
||||
}
|
||||
-- term without name uses hash
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary
|
||||
{
|
||||
"displayName": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
|
||||
"hash": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "Plain"
|
||||
}
|
||||
-- doc
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@icfnhas71n8q5rm7rmpe51hh7bltsr7rb4lv7qadc4cbsifu1mhonlqj2d7836iar2ptc648q9p4u7hf40ijvld574421b6u8gpu0lo/summary?name=doc
|
||||
{
|
||||
"displayName": "doc",
|
||||
"hash": "#icfnhas71n8q5rm7rmpe51hh7bltsr7rb4lv7qadc4cbsifu1mhonlqj2d7836iar2ptc648q9p4u7hf40ijvld574421b6u8gpu0lo",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#ej86si0ur1lsjade71dojr25phk9bbom9rdks6dltolos5tjivakujcriqe02npba53n9gd7tkh8bmv08ttjb9t35lq2ch5heshqcs0",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Doc2"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "Doc"
|
||||
}
|
||||
-- test
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@u17p9803hdibisou6rlr1sjbccdossgh7vtkd03ovlvnsl2n91lq94sqhughc62tnrual2jlrfk922sebp4nm22o7m5u9j40emft8r8/summary?name=mytest
|
||||
{
|
||||
"displayName": "mytest",
|
||||
"hash": "#u17p9803hdibisou6rlr1sjbccdossgh7vtkd03ovlvnsl2n91lq94sqhughc62tnrual2jlrfk922sebp4nm22o7m5u9j40emft8r8",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DelimiterChar"
|
||||
},
|
||||
"segment": "["
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#aql7qk3iud6vs4cvu43aimopoosgk0fnipibdkc3so13adencmibgfn0u5c01r0adei55nkl3ttsjhl8gbj7tr4gnpj63g64ftbq6s0",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Result"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DelimiterChar"
|
||||
},
|
||||
"segment": "]"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "Test"
|
||||
}
|
||||
-- function
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@6ee6j48hk3eovokflkgbmpbfr3oqj4hedqn8ocg3i4i0ko8j7nls7njjirmnh4k2bg8h95seaot798uuloqk62u2ttiqoceulkbmq2o/summary?name=func
|
||||
{
|
||||
"displayName": "func",
|
||||
"hash": "#6ee6j48hk3eovokflkgbmpbfr3oqj4hedqn8ocg3i4i0ko8j7nls7njjirmnh4k2bg8h95seaot798uuloqk62u2ttiqoceulkbmq2o",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "Plain"
|
||||
}
|
||||
-- constructor
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0@d0/summary?name=Thing.This
|
||||
{
|
||||
"displayName": "Thing.This",
|
||||
"hash": "#altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0#0",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Nat",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Nat"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Thing"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "DataConstructor"
|
||||
}
|
||||
-- Long type signature
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?name=funcWithLongType
|
||||
{
|
||||
"displayName": "funcWithLongType",
|
||||
"hash": "#ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "Plain"
|
||||
}
|
||||
-- Long type signature with render width
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?renderWidth=20&name=funcWithLongType
|
||||
{
|
||||
"displayName": "funcWithLongType",
|
||||
"hash": "#ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "\n"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Text",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Text"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "Plain"
|
||||
}
|
||||
-- Builtin Term
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@@IO.putBytes.impl.v3/summary?name=putBytesImpl
|
||||
{
|
||||
"displayName": "putBytesImpl",
|
||||
"hash": "##IO.putBytes.impl.v3",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Handle",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Handle"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##Bytes",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Bytes"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "TypeOperator"
|
||||
},
|
||||
"segment": "->"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "AbilityBraces"
|
||||
},
|
||||
"segment": "{"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "##IO",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "IO"
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "AbilityBraces"
|
||||
},
|
||||
"segment": "}"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#0o7mf021foma9acqdaibmlh1jidlijq08uf7f5se9tssttqs546pfunjpk6s31mqoq8s2o1natede8hkk6he45l95fibglidikt44v8",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Either"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "#r29dja8j9dmjjp45trccchaata8eo1h6d6haar1eai74pq1jt4m7u3ldhlq79f7phfo57eq4bau39vqotl2h63k7ff1m5sj5o9ajuf8",
|
||||
"tag": "TypeReference"
|
||||
},
|
||||
"segment": "Failure"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "("
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": ")"
|
||||
}
|
||||
],
|
||||
"tag": "BuiltinObject"
|
||||
},
|
||||
"tag": "Plain"
|
||||
}
|
||||
```## Type Summary APIs
|
||||
|
||||
```
|
||||
|
||||
```api
|
||||
-- data
|
||||
GET /api/projects/scratch/branches/main/definitions/types/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0/summary?name=Thing
|
||||
{
|
||||
"displayName": "Thing",
|
||||
"hash": "#altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DataTypeModifier"
|
||||
},
|
||||
"segment": "structural"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DataTypeKeyword"
|
||||
},
|
||||
"segment": "type"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "Thing",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "Thing"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "Data"
|
||||
}
|
||||
-- data with type args
|
||||
GET /api/projects/scratch/branches/main/definitions/types/by-hash/@nirp5os0q69o4e1u9p3t6mmq6l6otluefi3ksm7dhm0diidjvkkgl8o9bvnflbj0sanuvdusf34f1qrins3ktcaglpcqv9oums2slsg/summary?name=Maybe
|
||||
{
|
||||
"displayName": "Maybe",
|
||||
"hash": "#nirp5os0q69o4e1u9p3t6mmq6l6otluefi3ksm7dhm0diidjvkkgl8o9bvnflbj0sanuvdusf34f1qrins3ktcaglpcqv9oums2slsg",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DataTypeModifier"
|
||||
},
|
||||
"segment": "structural"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DataTypeKeyword"
|
||||
},
|
||||
"segment": "type"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "Maybe",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "Maybe"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DataTypeParams"
|
||||
},
|
||||
"segment": "a"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "Data"
|
||||
}
|
||||
-- ability
|
||||
GET /api/projects/scratch/branches/main/definitions/types/by-hash/@rfi1v9429f9qluv533l2iba77aadttilrpmnhljfapfnfa6sru2nr8ibpqvib9nc4s4nb9s1as45upsfqfqe6ivqi2p82b2vd866it8/summary?name=Stream
|
||||
{
|
||||
"displayName": "Stream",
|
||||
"hash": "#rfi1v9429f9qluv533l2iba77aadttilrpmnhljfapfnfa6sru2nr8ibpqvib9nc4s4nb9s1as45upsfqfqe6ivqi2p82b2vd866it8",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DataTypeModifier"
|
||||
},
|
||||
"segment": "structural"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DataTypeKeyword"
|
||||
},
|
||||
"segment": "ability"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"contents": "Stream",
|
||||
"tag": "HashQualifier"
|
||||
},
|
||||
"segment": "Stream"
|
||||
},
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": " "
|
||||
},
|
||||
{
|
||||
"annotation": {
|
||||
"tag": "DataTypeParams"
|
||||
},
|
||||
"segment": "s"
|
||||
}
|
||||
],
|
||||
"tag": "UserObject"
|
||||
},
|
||||
"tag": "Ability"
|
||||
}
|
||||
-- builtin type
|
||||
GET /api/projects/scratch/branches/main/definitions/types/by-hash/@@Nat/summary?name=Nat
|
||||
{
|
||||
"displayName": "Nat",
|
||||
"hash": "##Nat",
|
||||
"summary": {
|
||||
"contents": [
|
||||
{
|
||||
"annotation": null,
|
||||
"segment": "Nat"
|
||||
}
|
||||
],
|
||||
"tag": "BuiltinObject"
|
||||
},
|
||||
"tag": "Data"
|
||||
}
|
||||
```
|
||||
-- term
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary?name=nat
|
||||
-- term without name uses hash
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary
|
||||
-- doc
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@icfnhas71n8q5rm7rmpe51hh7bltsr7rb4lv7qadc4cbsifu1mhonlqj2d7836iar2ptc648q9p4u7hf40ijvld574421b6u8gpu0lo/summary?name=doc
|
||||
-- test
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@u17p9803hdibisou6rlr1sjbccdossgh7vtkd03ovlvnsl2n91lq94sqhughc62tnrual2jlrfk922sebp4nm22o7m5u9j40emft8r8/summary?name=mytest
|
||||
-- function
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@6ee6j48hk3eovokflkgbmpbfr3oqj4hedqn8ocg3i4i0ko8j7nls7njjirmnh4k2bg8h95seaot798uuloqk62u2ttiqoceulkbmq2o/summary?name=func
|
||||
-- constructor
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0@d0/summary?name=Thing.This
|
||||
-- Long type signature
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?name=funcWithLongType
|
||||
-- Long type signature with render width
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?renderWidth=20&name=funcWithLongType
|
||||
-- Builtin Term
|
||||
GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@@IO.putBytes.impl.v3/summary?name=putBytesImpl
|
||||
```
|
||||
|
||||
|
||||
🛑
|
||||
|
||||
The transcript failed due to an error in the stanza above. The error is:
|
||||
|
||||
Error decoding response from /api/projects/scratch/branches/main/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary?name=nat: Error in $: Failed reading: not a valid json value at 'QueryparameterrootBranchisrequired'
|
||||
|
@ -67,31 +67,20 @@ p1/main> find zzz
|
||||
|
||||
p1/main> fork p0/main:foo yyy
|
||||
|
||||
Done.
|
||||
|
||||
p1/main> find yyy
|
||||
|
||||
1. yyy.bar : ##Nat
|
||||
|
||||
|
||||
p0/main> fork p1/main: p0/main:p1
|
||||
|
||||
Done.
|
||||
|
||||
p0/main> ls p1
|
||||
|
||||
1. bonk (##Nat)
|
||||
2. donk/ (1 term)
|
||||
3. yyy/ (1 term)
|
||||
4. zzz/ (2 terms)
|
||||
|
||||
p0/main> ls p1.zzz
|
||||
|
||||
1. foo (##Nat)
|
||||
2. foo/ (1 term)
|
||||
|
||||
p0/main> ls p1.yyy
|
||||
|
||||
1. bar (##Nat)
|
||||
|
||||
```
|
||||
|
||||
```ucm
|
||||
p1/main> addp1/main> fork p0/main: zzzp1/main> find zzzp1/main> fork p0/main:foo yyyp1/main> find yyyp0/main> fork p1/main: p0/main:p1p0/main> ls p1p0/main> ls p1.zzzp0/main> ls p1.yyy
|
||||
```
|
||||
|
||||
|
||||
🛑
|
||||
|
||||
The transcript failed due to an error in the stanza above. The error is:
|
||||
|
||||
<none>:1:9:
|
||||
|
|
||||
1 | p0/main:foo
|
||||
| ^
|
||||
Expected an absolute path but found a relative path. Try adding a leading '.' to your path
|
||||
|
||||
|
@ -75,35 +75,21 @@ Deleting the root namespace should require confirmation if not forced.
|
||||
```ucm
|
||||
scratch/main> delete.namespace .
|
||||
|
||||
⚠️
|
||||
|
||||
Are you sure you want to clear away everything?
|
||||
You could use `project.create` to switch to a new project instead.
|
||||
|
||||
scratch/main> delete.namespace .
|
||||
|
||||
Okay, I deleted everything except the history. Use `undo` to
|
||||
undo, or `builtins.merge` to restore the absolute basics to
|
||||
the current path.
|
||||
|
||||
-- Should have an empty history
|
||||
scratch/main> history .
|
||||
|
||||
☝️ The namespace . is empty.
|
||||
|
||||
```
|
||||
Deleting the root namespace shouldn't require confirmation if forced.
|
||||
|
||||
```ucm
|
||||
scratch/main> delete.namespace.force .
|
||||
|
||||
Okay, I deleted everything except the history. Use `undo` to
|
||||
undo, or `builtins.merge` to restore the absolute basics to
|
||||
the current path.
|
||||
|
||||
-- Should have an empty history
|
||||
scratch/main> history .
|
||||
|
||||
☝️ The namespace . is empty.
|
||||
|
||||
scratch/main> delete.namespace .scratch/main> delete.namespace .-- Should have an empty historyscratch/main> history .
|
||||
```
|
||||
|
||||
|
||||
🛑
|
||||
|
||||
The transcript failed due to an error in the stanza above. The error is:
|
||||
|
||||
1:1:
|
||||
|
|
||||
1 | .
|
||||
| ^
|
||||
unexpected '.'
|
||||
expecting '`' or operator (valid characters: !$%&*+-/:<=>\^|~)
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
scratch/main> project.create-empty foo
|
||||
scratch/main> project.create-empty bar
|
||||
scratch/main> projects
|
||||
-- I can delete the project I'm currently on.
|
||||
foo/main> delete.project foo
|
||||
scratch/main> projects
|
||||
```
|
||||
|
@ -39,11 +39,29 @@ scratch/main> projects
|
||||
2. foo
|
||||
3. scratch
|
||||
|
||||
-- I can delete the project I'm currently on.
|
||||
foo/main> delete.project foo
|
||||
|
||||
🎉 I've created the project with the randomly-chosen name
|
||||
helpful-ladybug (use `project.rename <new-name>` to change
|
||||
it).
|
||||
|
||||
🎨 Type `ui` to explore this project's code in your browser.
|
||||
🔭 Discover libraries at https://share.unison-lang.org
|
||||
📖 Use `help-topic projects` to learn more about projects.
|
||||
|
||||
Write your first Unison code with UCM:
|
||||
|
||||
1. Open scratch.u.
|
||||
2. Write some Unison code and save the file.
|
||||
3. In UCM, type `add` to save it to your new project.
|
||||
|
||||
🎉 🥳 Happy coding!
|
||||
|
||||
scratch/main> projects
|
||||
|
||||
1. bar
|
||||
2. scratch
|
||||
2. helpful-ladybug
|
||||
3. scratch
|
||||
|
||||
```
|
||||
|
@ -52,7 +52,12 @@ The history of the namespace should be empty.
|
||||
```ucm
|
||||
scratch/main> history mynamespace
|
||||
|
||||
☝️ The namespace mynamespace is empty.
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
|
||||
|
||||
□ 1. #sg60bvjo91 (start of history)
|
||||
|
||||
```
|
||||
Add and then delete a term to add some history to a deleted namespace.
|
||||
|
@ -93,187 +93,19 @@ scratch/main> history
|
||||
|
||||
scratch/main> reset 1 foo
|
||||
|
||||
Done.
|
||||
scratch/foo does not exist.
|
||||
|
||||
scratch/main> ls foo.foo
|
||||
|
||||
1. a (Nat)
|
||||
|
||||
```
|
||||
# reset branch
|
||||
|
||||
```ucm
|
||||
foo/main> history
|
||||
|
||||
☝️ The namespace is empty.
|
||||
|
||||
```
|
||||
```unison
|
||||
a = 5
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
|
||||
I found and typechecked these definitions in scratch.u. If you
|
||||
do an `add` or `update`, here's how your codebase would
|
||||
change:
|
||||
|
||||
⍟ These new definitions are ok to `add`:
|
||||
|
||||
a : ##Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
foo/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
a : ##Nat
|
||||
|
||||
foo/main> branch topic
|
||||
|
||||
Done. I've created the topic branch based off of main.
|
||||
|
||||
Tip: To merge your work back into the main branch, first
|
||||
`switch /main` then `merge /topic`.
|
||||
|
||||
foo/main> history
|
||||
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
|
||||
|
||||
□ 1. #5l94rduvel (start of history)
|
||||
|
||||
```
|
||||
```unison
|
||||
a = 3
|
||||
scratch/main> addscratch/main> ls fooscratch/main> historyscratch/main> reset 1 fooscratch/main> ls foo.foo
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
🛑
|
||||
|
||||
I found and typechecked these definitions in scratch.u. If you
|
||||
do an `add` or `update`, here's how your codebase would
|
||||
change:
|
||||
|
||||
⍟ These names already exist. You can `update` them to your
|
||||
new definition:
|
||||
|
||||
a : ##Nat
|
||||
The transcript failed due to an error in the stanza above. The error is:
|
||||
|
||||
```
|
||||
```ucm
|
||||
foo/main> update
|
||||
|
||||
Okay, I'm searching the branch for code that needs to be
|
||||
updated...
|
||||
scratch/foo does not exist.
|
||||
|
||||
Done.
|
||||
|
||||
foo/main> reset /topic
|
||||
|
||||
Done.
|
||||
|
||||
foo/main> history
|
||||
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
|
||||
|
||||
□ 1. #5l94rduvel (start of history)
|
||||
|
||||
```
|
||||
# ambiguous reset
|
||||
|
||||
## ambiguous target
|
||||
```unison
|
||||
main.a = 3
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
|
||||
I found and typechecked these definitions in scratch.u. If you
|
||||
do an `add` or `update`, here's how your codebase would
|
||||
change:
|
||||
|
||||
⍟ These new definitions are ok to `add`:
|
||||
|
||||
main.a : ##Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
foo/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
main.a : ##Nat
|
||||
|
||||
foo/main> history
|
||||
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
⊙ 1. #0i64kpfccl
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
main.a
|
||||
|
||||
□ 2. #5l94rduvel (start of history)
|
||||
|
||||
foo/main> reset 2 main
|
||||
|
||||
I'm not sure if you wanted to reset the branch foo/main or the
|
||||
namespace main in the current branch. Could you be more
|
||||
specific?
|
||||
|
||||
1. /main (the branch main in the current project)
|
||||
2. main (the relative path main in the current branch)
|
||||
|
||||
Tip: use `reset <some hash> 1` or `reset <some hash> 2` to
|
||||
pick one of these.
|
||||
|
||||
```
|
||||
## ambiguous hash
|
||||
|
||||
```unison
|
||||
main.a = 3
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
|
||||
I found and typechecked the definitions in scratch.u. This
|
||||
file has been previously added to the codebase.
|
||||
|
||||
```
|
||||
```ucm
|
||||
foo/main> switch /topic
|
||||
|
||||
foo/topic> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
main.a : ##Nat
|
||||
|
||||
foo/topic> reset main
|
||||
|
||||
I'm not sure if you wanted to reset to the branch foo/main or
|
||||
to the namespace main in the current branch. Could you be more
|
||||
specific?
|
||||
|
||||
1. /main (the branch main in the current project)
|
||||
2. main (the relative path main in the current branch)
|
||||
|
||||
Tip: use `reset 1` or `reset 2` to pick one of these.
|
||||
|
||||
```
|
||||
|
@ -93,12 +93,13 @@ proj/main> view thingy
|
||||
thingy : Int
|
||||
thingy =
|
||||
use Int +
|
||||
foo + +10
|
||||
new.foo + +10
|
||||
|
||||
proj/main> ls lib
|
||||
|
||||
1. builtin/ (469 terms, 74 types)
|
||||
2. new/ (1 term)
|
||||
3. old/ (1 term)
|
||||
|
||||
proj/main> branches
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user