Skip to content

Commit c7918f2

Browse files
committed
Update transcripts to test suffixification
1 parent e78b54d commit c7918f2

File tree

4 files changed

+235
-1
lines changed

4 files changed

+235
-1
lines changed

transcripts/share-apis/code-browse/codebase-namespace-by-name-root.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"body": {
33
"fqn": "",
4-
"hash": "#00i5tm0i0v41f379hmhk06sktu1ifrtaaftsbe3qcpsef6b8p1rrpir1ac88v3m6pp5q8m4on28i87tftnsrs41eb4h7tq1e6lbd48g",
4+
"hash": "#7knfjg5q894hvmubdsh6al4nvdcoo0ddg0a1v09uskiptgb7u76k0aj8lmg0hf1r1qsiktdmhv6oo0s543rup8tk4hq6t258luo0770",
55
"readme": null
66
},
77
"status": [

transcripts/share-apis/code-browse/prelude.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,24 @@ external.externalName = 99
2929
-- Helpful for testing proper query encoding/decoding for a name that must be
3030
-- uri encoded
3131
a names./+% b = 10
32+
33+
34+
-- Test that suffixification works as expected
35+
36+
-- We shouldn't qualify project names if the only conflict is in lib.
37+
ns.myName = "projectName"
38+
lib.data.myName = "libName"
39+
40+
-- We _should_ still qualify names in lib if all conflicts are in libs.
41+
lib.other.myOtherName = "other.myOtherName"
42+
lib.data.myOtherName = "data.myOtherName"
43+
44+
-- A term which references the names we defined above
45+
macroTerm = do
46+
_ = ns.myName
47+
_ = lib.data.myName
48+
_ = lib.other.myOtherName
49+
1
3250
```
3351

3452
```ucm

transcripts/share-apis/code-browse/run.zsh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ fetch "$transcripts_user" GET codebase-type-dependents-by-name "/users/transcrip
2828
fetch "$transcripts_user" GET codebase-term-dependents-by-hash "/users/transcripts/projects/code-browse/branches/main/definitions/dependents/by-hash/@dcgdua2lj6upd1ah5v0qp09gjsej0d77d87fu6qn8e2qrssnlnmuinoio46hiu53magr7qn8vnqke8ndt0v76700o5u8gcvo7st28jg"
2929
fetch "$transcripts_user" GET codebase-type-dependents-by-hash "/users/transcripts/projects/code-browse/branches/main/definitions/dependents/by-hash/@6kbe32g06nqg93cqub6ohqc4ql4o49ntgnunifds0t75qre6lacnbsr3evn8bkivj68ecbvmhkbak4dbg4fqertcpgb396rmo34tnh0"
3030

31+
# Test that suffixification works as expected.
32+
fetch "$transcripts_user" GET suffixification-test "/users/transcripts/projects/code-browse/branches/main/definitions/by-name/macroTerm"
33+
3134

3235
fetch "$transcripts_user" GET codebase-find "/users/transcripts/projects/code-browse/branches/main/find?query=oranges.tw"
3336
fetch "$transcripts_user" GET codebase-namespace-by-name "/users/transcripts/projects/code-browse/branches/main/namespaces/by-name/names"
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
{
2+
"body": {
3+
"missingDefinitions": [],
4+
"termDefinitions": {
5+
"#gautmg9djqka7229ff9dcuers1ilg8tdleaivgeh3em11gdjdnr6jl98hag18htoqhiupmmvttq3knuuonibla25nuqdrjo9i8ic3g0": {
6+
"bestTermName": "macroTerm",
7+
"defnTermTag": "Plain",
8+
"signature": [
9+
{
10+
"annotation": {
11+
"tag": "DelayForceChar"
12+
},
13+
"segment": "'"
14+
},
15+
{
16+
"annotation": {
17+
"contents": "##Nat",
18+
"fqn": "builtin.Nat",
19+
"tag": "TypeReference"
20+
},
21+
"segment": "Nat"
22+
}
23+
],
24+
"termDefinition": {
25+
"contents": [
26+
{
27+
"annotation": {
28+
"contents": "macroTerm",
29+
"tag": "HashQualifier"
30+
},
31+
"segment": "macroTerm"
32+
},
33+
{
34+
"annotation": {
35+
"tag": "TypeAscriptionColon"
36+
},
37+
"segment": " :"
38+
},
39+
{
40+
"annotation": null,
41+
"segment": " "
42+
},
43+
{
44+
"annotation": {
45+
"tag": "DelayForceChar"
46+
},
47+
"segment": "'"
48+
},
49+
{
50+
"annotation": {
51+
"contents": "##Nat",
52+
"fqn": "builtin.Nat",
53+
"tag": "TypeReference"
54+
},
55+
"segment": "Nat"
56+
},
57+
{
58+
"annotation": null,
59+
"segment": "\n"
60+
},
61+
{
62+
"annotation": {
63+
"contents": "macroTerm",
64+
"tag": "HashQualifier"
65+
},
66+
"segment": "macroTerm"
67+
},
68+
{
69+
"annotation": {
70+
"tag": "BindingEquals"
71+
},
72+
"segment": " ="
73+
},
74+
{
75+
"annotation": null,
76+
"segment": " "
77+
},
78+
{
79+
"annotation": {
80+
"tag": "ControlKeyword"
81+
},
82+
"segment": "do"
83+
},
84+
{
85+
"annotation": null,
86+
"segment": "\n"
87+
},
88+
{
89+
"annotation": null,
90+
"segment": " "
91+
},
92+
{
93+
"annotation": {
94+
"contents": "_",
95+
"tag": "HashQualifier"
96+
},
97+
"segment": "_"
98+
},
99+
{
100+
"annotation": {
101+
"tag": "BindingEquals"
102+
},
103+
"segment": " ="
104+
},
105+
{
106+
"annotation": null,
107+
"segment": " "
108+
},
109+
{
110+
"annotation": {
111+
"contents": "#g60c4so0q827jpdkpd3ll8kfst33s3fuh58akvb5r8fp4jimmgfq8is5ongh4bfo9m048nf9soa54fg271fgcqdlktl4pnf6l01s4ug",
112+
"fqn": "ns.myName",
113+
"tag": "TermReference"
114+
},
115+
"segment": "myName"
116+
},
117+
{
118+
"annotation": null,
119+
"segment": "\n"
120+
},
121+
{
122+
"annotation": null,
123+
"segment": " "
124+
},
125+
{
126+
"annotation": {
127+
"contents": "_",
128+
"tag": "HashQualifier"
129+
},
130+
"segment": "_"
131+
},
132+
{
133+
"annotation": {
134+
"tag": "BindingEquals"
135+
},
136+
"segment": " ="
137+
},
138+
{
139+
"annotation": null,
140+
"segment": " "
141+
},
142+
{
143+
"annotation": {
144+
"contents": "#9gk80dbuj7dm76vf8vfe49k265k0n6bcft5g7s3a6j0papkv7bd5n78735qs1s0ag3rcrm5pcip02e8b28qf9i1kpvvu1fdl8p4fkeg",
145+
"fqn": "lib.data.myName",
146+
"tag": "TermReference"
147+
},
148+
"segment": "data.myName"
149+
},
150+
{
151+
"annotation": null,
152+
"segment": "\n"
153+
},
154+
{
155+
"annotation": null,
156+
"segment": " "
157+
},
158+
{
159+
"annotation": {
160+
"contents": "_",
161+
"tag": "HashQualifier"
162+
},
163+
"segment": "_"
164+
},
165+
{
166+
"annotation": {
167+
"tag": "BindingEquals"
168+
},
169+
"segment": " ="
170+
},
171+
{
172+
"annotation": null,
173+
"segment": " "
174+
},
175+
{
176+
"annotation": {
177+
"contents": "#5q9p802rfedn2kuvc3ohbjiqk7l6usu6gfv6et2l93e5s7q2vtoai3nup17a02djcsekjiq99unf62el8ilih4f1c0jqbgioup67da0",
178+
"fqn": "lib.other.myOtherName",
179+
"tag": "TermReference"
180+
},
181+
"segment": "other.myOtherName"
182+
},
183+
{
184+
"annotation": null,
185+
"segment": "\n"
186+
},
187+
{
188+
"annotation": null,
189+
"segment": " "
190+
},
191+
{
192+
"annotation": {
193+
"tag": "NumericLiteral"
194+
},
195+
"segment": "1"
196+
}
197+
],
198+
"tag": "UserObject"
199+
},
200+
"termDocs": [],
201+
"termNames": [
202+
"macroTerm"
203+
]
204+
}
205+
},
206+
"typeDefinitions": {}
207+
},
208+
"status": [
209+
{
210+
"status_code": 200
211+
}
212+
]
213+
}

0 commit comments

Comments
 (0)