diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f4658d6..853d80f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -237,7 +237,7 @@ jobs: # Install ucm mkdir ucm - curl -L https://github.com/unisonweb/unison/releases/download/release%2F0.5.19/ucm-linux.tar.gz | tar -xz -C ucm + curl -L https://github.com/unisonweb/unison/releases/download/release%2F0.5.23/ucm-linux.tar.gz | tar -xz -C ucm export PATH=$PWD/ucm:$PATH # Clean up old postgres data if it exists. diff --git a/src/Share/Codebase/Types.hs b/src/Share/Codebase/Types.hs index 89b0687..791dacb 100644 --- a/src/Share/Codebase/Types.hs +++ b/src/Share/Codebase/Types.hs @@ -16,13 +16,13 @@ import Share.Prelude import Unison.Codebase.CodeLookup qualified as CL import Unison.Codebase.Path qualified as Path import Unison.Codebase.Runtime qualified as Rt +import Unison.NameSegment.Internal (NameSegment (..)) import Unison.Parser.Ann (Ann) import Unison.Reference qualified as Reference import Unison.Symbol (Symbol) -import Unison.NameSegment.Internal (NameSegment (..)) publicRoot :: Path.Path -publicRoot = Path.singleton $ NameSegment "public" +publicRoot = Path.singleton (NameSegment "public") -- | The scope of a given codebase transaction. data CodebaseEnv = CodebaseEnv diff --git a/src/Share/Postgres/Causal/Queries.hs b/src/Share/Postgres/Causal/Queries.hs index f5268de..3c6ccad 100644 --- a/src/Share/Postgres/Causal/Queries.hs +++ b/src/Share/Postgres/Causal/Queries.hs @@ -56,7 +56,7 @@ import Unison.Codebase.Path qualified as Path import Unison.Hash (Hash) import Unison.Hash32 (Hash32) import Unison.Hashing.V2 qualified as H -import Unison.NameSegment.Internal (NameSegment (..)) +import Unison.NameSegment.Internal as NameSegment import Unison.Reference qualified as Reference import Unison.Util.Map qualified as Map @@ -765,16 +765,16 @@ saveV2BranchShallow v2Branch = do expectV2BranchDependencies V2.Branch {terms, types, patches, children} = do terms' <- terms - & Map.bitraverse (pure . coerce @NameSegment @Text) (traverse (fmap mdValuesToMetadataSetFormat)) + & Map.bitraverse (pure . NameSegment.toUnescapedText) (traverse (fmap mdValuesToMetadataSetFormat)) types' <- types - & Map.bitraverse (pure . coerce @NameSegment @Text) (traverse (fmap mdValuesToMetadataSetFormat)) + & Map.bitraverse (pure . NameSegment.toUnescapedText) (traverse (fmap mdValuesToMetadataSetFormat)) let patches' = patches - & Map.bimap (coerce @NameSegment @Text) fst + & Map.bimap NameSegment.toUnescapedText fst let children' = children - & Map.bimap (coerce @NameSegment @Text) Causal.causalHash + & Map.bimap NameSegment.toUnescapedText Causal.causalHash let hashBranchFull :: BranchFull.Branch' Text Hash PatchHash CausalHash = BranchFull.Branch { terms = terms', diff --git a/src/Share/Postgres/Sync/Conversions.hs b/src/Share/Postgres/Sync/Conversions.hs index c404a06..951e8bd 100644 --- a/src/Share/Postgres/Sync/Conversions.hs +++ b/src/Share/Postgres/Sync/Conversions.hs @@ -35,7 +35,7 @@ branchV2ToBF (V2.Branch {terms, types, patches, children}) = do where convertTerms :: Map NameSegment (Map V2.Referent (m V2.MdValues)) -> m (Map Text (Map (BranchFull.Referent'' Text Hash) (BranchFull.MetadataSetFormat' Text Hash))) convertTerms m = do - Map.mapKeys (coerce @NameSegment @Text) m + Map.mapKeys NameSegment.toUnescapedText m & traversed . traversed %%~ \mdM -> do V2.MdValues md <- mdM diff --git a/src/Share/Web/Authorization.hs b/src/Share/Web/Authorization.hs index ae8717b..5331bba 100644 --- a/src/Share/Web/Authorization.hs +++ b/src/Share/Web/Authorization.hs @@ -70,6 +70,7 @@ import Data.Set.NonEmpty (NESet) import Data.Set.NonEmpty qualified as NESet import Data.Text.Encoding qualified as Text import Data.Time qualified as Time +import Servant import Share.Branch import Share.Contribution (Contribution (..), ContributionStatus (..)) import Share.IDs @@ -91,7 +92,6 @@ import Share.Web.Errors qualified as Errors import Share.Web.Share.Comments import Share.Web.Share.Contributions.Types (UpdateContributionRequest (..)) import Share.Web.Share.Tickets.Types -import Servant import Unison.Codebase.Path (Path) import Unison.Codebase.Path qualified as Path import Unison.NameSegment.Internal (NameSegment (..)) diff --git a/src/Unison/PrettyPrintEnvDecl/Postgres.hs b/src/Unison/PrettyPrintEnvDecl/Postgres.hs index 742e4f8..a07e608 100644 --- a/src/Unison/PrettyPrintEnvDecl/Postgres.hs +++ b/src/Unison/PrettyPrintEnvDecl/Postgres.hs @@ -13,8 +13,6 @@ import Share.Prelude import Unison.HashQualified' qualified as HQ' import Unison.LabeledDependency (LabeledDependency) import Unison.Name (Name) -import Unison.Name qualified as Name -import Unison.NameSegment.Internal (NameSegment (..)) import Unison.PrettyPrintEnv qualified as PPE import Unison.PrettyPrintEnvDecl qualified as PPED import Unison.Reference qualified as V1 @@ -31,11 +29,11 @@ ppedForReferences namesPerspective refs = do namesForReference :: Either (V1.Referent, PGReferent) (V1.Reference, PGReference) -> m ([(Name, Name, V1.Referent)], [(Name, Name, V1.Reference)]) namesForReference = \case Left (ref, pgref) -> do - termNames <- fmap (bothMap $ Name.fromReverseSegments . fmap NameSegment . coerce @NameLookups.ReversedName @(NonEmpty Text)) <$> NameLookupOps.termNamesForRefWithinNamespace namesPerspective pgref Nothing + termNames <- fmap (bothMap NameLookups.reversedNameToName) <$> NameLookupOps.termNamesForRefWithinNamespace namesPerspective pgref Nothing let termNames' = termNames <&> \(fqn, suffixed) -> (fqn, suffixed, ref) pure $ (termNames', []) Right (ref, pgref) -> do - typeNames <- fmap (bothMap $ Name.fromReverseSegments . coerce) <$> NameLookupOps.typeNamesForRefWithinNamespace namesPerspective pgref Nothing + typeNames <- fmap (bothMap NameLookups.reversedNameToName) <$> NameLookupOps.typeNamesForRefWithinNamespace namesPerspective pgref Nothing let typeNames' = typeNames <&> \(fqn, suffixed) -> (fqn, suffixed, ref) pure $ ([], typeNames') diff --git a/src/Unison/Server/NameSearch/Postgres.hs b/src/Unison/Server/NameSearch/Postgres.hs index f5ebb04..735335b 100644 --- a/src/Unison/Server/NameSearch/Postgres.hs +++ b/src/Unison/Server/NameSearch/Postgres.hs @@ -17,6 +17,7 @@ import Unison.HashQualified' qualified as HQ' import Unison.Name (Name) import Unison.Name qualified as Name import Unison.NameSegment.Internal (NameSegment (..)) +import Unison.NameSegment.Internal qualified as NameSegment import Unison.NamesWithHistory (SearchType (..)) import Unison.Reference qualified as V1 import Unison.Reference qualified as V1Reference @@ -123,4 +124,4 @@ nameSearchForPerspective namesPerspective = -- Fully qualify a name by prepending the current namespace perspective's path fullyQualifyName :: Name -> Name - fullyQualifyName name = fromMaybe name $ Path.maybePrefixName (Path.AbsolutePath' . Path.Absolute $ (Path.fromList . fmap NameSegment . coerce @PathSegments @[Text] $ pathToMountedNameLookup namesPerspective)) name + fullyQualifyName name = fromMaybe name $ Path.maybePrefixName (Path.AbsolutePath' $ Path.Absolute (Path.fromList . (fmap NameSegment.NameSegment) . into @[Text] $ pathToMountedNameLookup namesPerspective)) name diff --git a/src/Unison/Server/Share/NamespaceDetails.hs b/src/Unison/Server/Share/NamespaceDetails.hs index be41a5d..3e29416 100644 --- a/src/Unison/Server/Share/NamespaceDetails.hs +++ b/src/Unison/Server/Share/NamespaceDetails.hs @@ -28,4 +28,4 @@ namespaceDetails runtime namespacePath rootCausalId mayWidth = runMaybeT $ do mayReadme <- lift $ RenderDoc.findAndRenderDoc readmeNames runtime namespacePath rootCausalId mayWidth pure $ NamespaceDetails namespacePath ("#" <> from @CausalHash @UnisonHash causalHashAtPath) mayReadme where - readmeNames = Set.fromList $ fmap NameSegment ["README", "Readme", "ReadMe", "readme"] + readmeNames = Set.fromList . fmap NameSegment $ ["README", "Readme", "ReadMe", "readme"] diff --git a/transcripts/run-transcripts.zsh b/transcripts/run-transcripts.zsh index 6ad11e9..0f2ed0a 100755 --- a/transcripts/run-transcripts.zsh +++ b/transcripts/run-transcripts.zsh @@ -18,11 +18,11 @@ transcripts=( contributions transcripts/share-apis/contributions/ projects-flow transcripts/share-apis/projects-flow/ project-maintainers transcripts/share-apis/project-maintainers/ - release transcripts/share-apis/releases - branche transcripts/share-apis/branches - branch-brows transcripts/share-apis/branch-browse - loose-code transcripts/share-apis/loose-code/ - sync-apis transcripts/sync-apis + release transcripts/share-apis/releases/ + branche transcripts/share-apis/branches/ + branch-browse transcripts/share-apis/branch-browse/ + code-browse transcripts/share-apis/code-browse/ + sync-apis transcripts/sync-apis/ ) for transcript dir in "${(@kv)transcripts}"; do diff --git a/transcripts/share-apis/loose-code/account.json b/transcripts/share-apis/code-browse/account.json similarity index 100% rename from transcripts/share-apis/loose-code/account.json rename to transcripts/share-apis/code-browse/account.json diff --git a/transcripts/share-apis/loose-code/codebase-browse.json b/transcripts/share-apis/code-browse/codebase-browse.json similarity index 98% rename from transcripts/share-apis/loose-code/codebase-browse.json rename to transcripts/share-apis/code-browse/codebase-browse.json index a2b2328..742ada0 100644 --- a/transcripts/share-apis/loose-code/codebase-browse.json +++ b/transcripts/share-apis/code-browse/codebase-browse.json @@ -125,7 +125,7 @@ "tag": "TermObject" } ], - "namespaceListingFQN": "public.names", + "namespaceListingFQN": "names", "namespaceListingHash": "#77bp25t820hpn7t6andan3evac2o5gon8ulggl3kq2galktlbo10jkpub3rli3teop6h5ikgjhuirk87hf58g7cir4pk0ra6a9r5rro" }, "status": 200 diff --git a/transcripts/share-apis/loose-code/codebase-definition-by-hash-constructor.json b/transcripts/share-apis/code-browse/codebase-definition-by-hash-constructor.json similarity index 93% rename from transcripts/share-apis/loose-code/codebase-definition-by-hash-constructor.json rename to transcripts/share-apis/code-browse/codebase-definition-by-hash-constructor.json index 954bcc6..b9fa655 100644 --- a/transcripts/share-apis/loose-code/codebase-definition-by-hash-constructor.json +++ b/transcripts/share-apis/code-browse/codebase-definition-by-hash-constructor.json @@ -30,10 +30,10 @@ }, { "annotation": { - "contents": "public.names.Thing", + "contents": "names.Thing", "tag": "HashQualifier" }, - "segment": "public.names.Thing" + "segment": "names.Thing" }, { "annotation": { @@ -66,7 +66,7 @@ }, "typeDocs": [], "typeNames": [ - "public.names.Thing" + "names.Thing" ] } } diff --git a/transcripts/share-apis/loose-code/codebase-definition-by-hash-term.json b/transcripts/share-apis/code-browse/codebase-definition-by-hash-term.json similarity index 85% rename from transcripts/share-apis/loose-code/codebase-definition-by-hash-term.json rename to transcripts/share-apis/code-browse/codebase-definition-by-hash-term.json index 2a80db7..6e06aa5 100644 --- a/transcripts/share-apis/loose-code/codebase-definition-by-hash-term.json +++ b/transcripts/share-apis/code-browse/codebase-definition-by-hash-term.json @@ -18,10 +18,10 @@ "contents": [ { "annotation": { - "contents": "public.external.two", + "contents": "external.two", "tag": "HashQualifier" }, - "segment": "public.external.two" + "segment": "external.two" }, { "annotation": { @@ -46,10 +46,10 @@ }, { "annotation": { - "contents": "public.external.two", + "contents": "external.two", "tag": "HashQualifier" }, - "segment": "public.external.two" + "segment": "external.two" }, { "annotation": { @@ -72,9 +72,9 @@ }, "termDocs": [], "termNames": [ - "public.external.two", - "public.names.apples.two", - "public.names.oranges.two" + "external.two", + "names.apples.two", + "names.oranges.two" ] } }, diff --git a/transcripts/share-apis/loose-code/codebase-definition-by-name-encoded.json b/transcripts/share-apis/code-browse/codebase-definition-by-name-encoded.json similarity index 95% rename from transcripts/share-apis/loose-code/codebase-definition-by-name-encoded.json rename to transcripts/share-apis/code-browse/codebase-definition-by-name-encoded.json index 63e1c61..26af285 100644 --- a/transcripts/share-apis/loose-code/codebase-definition-by-name-encoded.json +++ b/transcripts/share-apis/code-browse/codebase-definition-by-name-encoded.json @@ -64,10 +64,10 @@ }, { "annotation": { - "contents": "public.names./+%", + "contents": "names./+%", "tag": "HashQualifier" }, - "segment": "public.names./+%" + "segment": "names./+%" }, { "annotation": { @@ -148,10 +148,10 @@ }, { "annotation": { - "contents": "public.names./+%", + "contents": "names./+%", "tag": "HashQualifier" }, - "segment": "public.names./+%" + "segment": "names./+%" }, { "annotation": null, @@ -184,7 +184,7 @@ }, "termDocs": [], "termNames": [ - "public.names./+%" + "names./+%" ] } }, diff --git a/transcripts/share-apis/loose-code/codebase-definition-by-name-should-minimally-suffix-again.json b/transcripts/share-apis/code-browse/codebase-definition-by-name-should-minimally-suffix-again.json similarity index 84% rename from transcripts/share-apis/loose-code/codebase-definition-by-name-should-minimally-suffix-again.json rename to transcripts/share-apis/code-browse/codebase-definition-by-name-should-minimally-suffix-again.json index 09f7c41..4b30b8b 100644 --- a/transcripts/share-apis/loose-code/codebase-definition-by-name-should-minimally-suffix-again.json +++ b/transcripts/share-apis/code-browse/codebase-definition-by-name-should-minimally-suffix-again.json @@ -18,10 +18,10 @@ "contents": [ { "annotation": { - "contents": "public.names.apples.two", + "contents": "names.apples.two", "tag": "HashQualifier" }, - "segment": "public.names.apples.two" + "segment": "names.apples.two" }, { "annotation": { @@ -46,10 +46,10 @@ }, { "annotation": { - "contents": "public.names.apples.two", + "contents": "names.apples.two", "tag": "HashQualifier" }, - "segment": "public.names.apples.two" + "segment": "names.apples.two" }, { "annotation": { @@ -72,9 +72,9 @@ }, "termDocs": [], "termNames": [ - "public.names.apples.two", - "public.names.oranges.two", - "public.external.two" + "names.apples.two", + "names.oranges.two", + "external.two" ] } }, diff --git a/transcripts/share-apis/loose-code/codebase-definition-by-name-should-minimally-suffix.json b/transcripts/share-apis/code-browse/codebase-definition-by-name-should-minimally-suffix.json similarity index 84% rename from transcripts/share-apis/loose-code/codebase-definition-by-name-should-minimally-suffix.json rename to transcripts/share-apis/code-browse/codebase-definition-by-name-should-minimally-suffix.json index 213000b..3d50169 100644 --- a/transcripts/share-apis/loose-code/codebase-definition-by-name-should-minimally-suffix.json +++ b/transcripts/share-apis/code-browse/codebase-definition-by-name-should-minimally-suffix.json @@ -18,10 +18,10 @@ "contents": [ { "annotation": { - "contents": "public.names.oranges.two", + "contents": "names.oranges.two", "tag": "HashQualifier" }, - "segment": "public.names.oranges.two" + "segment": "names.oranges.two" }, { "annotation": { @@ -46,10 +46,10 @@ }, { "annotation": { - "contents": "public.names.oranges.two", + "contents": "names.oranges.two", "tag": "HashQualifier" }, - "segment": "public.names.oranges.two" + "segment": "names.oranges.two" }, { "annotation": { @@ -72,9 +72,9 @@ }, "termDocs": [], "termNames": [ - "public.names.oranges.two", - "public.names.apples.two", - "public.external.two" + "names.oranges.two", + "names.apples.two", + "external.two" ] } }, diff --git a/transcripts/share-apis/loose-code/codebase-definition-by-name-should-not-find-names-in-other-namespaces.json b/transcripts/share-apis/code-browse/codebase-definition-by-name-should-not-find-names-in-other-namespaces.json similarity index 78% rename from transcripts/share-apis/loose-code/codebase-definition-by-name-should-not-find-names-in-other-namespaces.json rename to transcripts/share-apis/code-browse/codebase-definition-by-name-should-not-find-names-in-other-namespaces.json index 9c0a916..58d5377 100644 --- a/transcripts/share-apis/loose-code/codebase-definition-by-name-should-not-find-names-in-other-namespaces.json +++ b/transcripts/share-apis/code-browse/codebase-definition-by-name-should-not-find-names-in-other-namespaces.json @@ -1,7 +1,7 @@ { "body": { "missingDefinitions": [ - "public.names.externalName" + "names.externalName" ], "termDefinitions": {}, "typeDefinitions": {} diff --git a/transcripts/share-apis/loose-code/codebase-definition-by-name-should-pretty-print-external-names-if-no-local-name.json b/transcripts/share-apis/code-browse/codebase-definition-by-name-should-pretty-print-external-names-if-no-local-name.json similarity index 93% rename from transcripts/share-apis/loose-code/codebase-definition-by-name-should-pretty-print-external-names-if-no-local-name.json rename to transcripts/share-apis/code-browse/codebase-definition-by-name-should-pretty-print-external-names-if-no-local-name.json index c4a3e1c..ec63c86 100644 --- a/transcripts/share-apis/loose-code/codebase-definition-by-name-should-pretty-print-external-names-if-no-local-name.json +++ b/transcripts/share-apis/code-browse/codebase-definition-by-name-should-pretty-print-external-names-if-no-local-name.json @@ -18,10 +18,10 @@ "contents": [ { "annotation": { - "contents": "public.names.referencesExternal", + "contents": "names.referencesExternal", "tag": "HashQualifier" }, - "segment": "public.names.referencesExternal" + "segment": "names.referencesExternal" }, { "annotation": { @@ -46,10 +46,10 @@ }, { "annotation": { - "contents": "public.names.referencesExternal", + "contents": "names.referencesExternal", "tag": "HashQualifier" }, - "segment": "public.names.referencesExternal" + "segment": "names.referencesExternal" }, { "annotation": { @@ -150,7 +150,7 @@ }, "termDocs": [], "termNames": [ - "public.names.referencesExternal" + "names.referencesExternal" ] } }, diff --git a/transcripts/share-apis/loose-code/codebase-definition-by-name-should-work-with-empty-perspective.json b/transcripts/share-apis/code-browse/codebase-definition-by-name-should-work-with-empty-perspective.json similarity index 84% rename from transcripts/share-apis/loose-code/codebase-definition-by-name-should-work-with-empty-perspective.json rename to transcripts/share-apis/code-browse/codebase-definition-by-name-should-work-with-empty-perspective.json index 213000b..3d50169 100644 --- a/transcripts/share-apis/loose-code/codebase-definition-by-name-should-work-with-empty-perspective.json +++ b/transcripts/share-apis/code-browse/codebase-definition-by-name-should-work-with-empty-perspective.json @@ -18,10 +18,10 @@ "contents": [ { "annotation": { - "contents": "public.names.oranges.two", + "contents": "names.oranges.two", "tag": "HashQualifier" }, - "segment": "public.names.oranges.two" + "segment": "names.oranges.two" }, { "annotation": { @@ -46,10 +46,10 @@ }, { "annotation": { - "contents": "public.names.oranges.two", + "contents": "names.oranges.two", "tag": "HashQualifier" }, - "segment": "public.names.oranges.two" + "segment": "names.oranges.two" }, { "annotation": { @@ -72,9 +72,9 @@ }, "termDocs": [], "termNames": [ - "public.names.oranges.two", - "public.names.apples.two", - "public.external.two" + "names.oranges.two", + "names.apples.two", + "external.two" ] } }, diff --git a/transcripts/share-apis/loose-code/codebase-definition-by-name.json b/transcripts/share-apis/code-browse/codebase-definition-by-name.json similarity index 91% rename from transcripts/share-apis/loose-code/codebase-definition-by-name.json rename to transcripts/share-apis/code-browse/codebase-definition-by-name.json index 1b9bad6..be131d6 100644 --- a/transcripts/share-apis/loose-code/codebase-definition-by-name.json +++ b/transcripts/share-apis/code-browse/codebase-definition-by-name.json @@ -18,10 +18,10 @@ "contents": [ { "annotation": { - "contents": "public.names.apples.compoundTerm", + "contents": "names.apples.compoundTerm", "tag": "HashQualifier" }, - "segment": "public.names.apples.compoundTerm" + "segment": "names.apples.compoundTerm" }, { "annotation": { @@ -46,10 +46,10 @@ }, { "annotation": { - "contents": "public.names.apples.compoundTerm", + "contents": "names.apples.compoundTerm", "tag": "HashQualifier" }, - "segment": "public.names.apples.compoundTerm" + "segment": "names.apples.compoundTerm" }, { "annotation": { @@ -128,7 +128,7 @@ }, "termDocs": [], "termNames": [ - "public.names.apples.compoundTerm" + "names.apples.compoundTerm" ] } }, diff --git a/transcripts/share-apis/loose-code/codebase-find.json b/transcripts/share-apis/code-browse/codebase-find.json similarity index 100% rename from transcripts/share-apis/loose-code/codebase-find.json rename to transcripts/share-apis/code-browse/codebase-find.json diff --git a/transcripts/share-apis/code-browse/codebase-namespace-by-name-root.json b/transcripts/share-apis/code-browse/codebase-namespace-by-name-root.json new file mode 100644 index 0000000..8bac4a4 --- /dev/null +++ b/transcripts/share-apis/code-browse/codebase-namespace-by-name-root.json @@ -0,0 +1,8 @@ +{ + "body": { + "fqn": "", + "hash": "#r5v225oed8drb36fume3h5uo3bgbg9sbc739u591q8uod3oksi5s0n0si838dkt5smqe3vv1dc9jcibi5jvrbg5c3g9iojd2se5g2h8", + "readme": null + }, + "status": 200 +} diff --git a/transcripts/share-apis/loose-code/codebase-namespace-by-name.json b/transcripts/share-apis/code-browse/codebase-namespace-by-name.json similarity index 91% rename from transcripts/share-apis/loose-code/codebase-namespace-by-name.json rename to transcripts/share-apis/code-browse/codebase-namespace-by-name.json index fbd7b59..2adf0a0 100644 --- a/transcripts/share-apis/loose-code/codebase-namespace-by-name.json +++ b/transcripts/share-apis/code-browse/codebase-namespace-by-name.json @@ -1,6 +1,6 @@ { "body": { - "fqn": "public.names", + "fqn": "names", "hash": "#77bp25t820hpn7t6andan3evac2o5gon8ulggl3kq2galktlbo10jkpub3rli3teop6h5ikgjhuirk87hf58g7cir4pk0ra6a9r5rro", "readme": { "contents": [ diff --git a/transcripts/share-apis/loose-code/prelude.md b/transcripts/share-apis/code-browse/prelude.md similarity index 76% rename from transcripts/share-apis/loose-code/prelude.md rename to transcripts/share-apis/code-browse/prelude.md index 713b71c..b5a6701 100644 --- a/transcripts/share-apis/loose-code/prelude.md +++ b/transcripts/share-apis/code-browse/prelude.md @@ -1,5 +1,6 @@ ```ucm:hide -.> builtins.mergeio +.> project.create-empty code-browse +code-browse/main> builtins.mergeio ``` Set up some shared names so we can do interesting transcript tests @@ -18,16 +19,16 @@ external.externalName = 99 ```ucm -.> add +code-browse/main> add ``` ```unison -- Helpful for testing proper query encoding/decoding for a name that must be -- uri encoded -a /+% b = 10 +a names./+% b = 10 ``` ```ucm -.names> add -.> push.create transcripts.public +code-browse/main> add +code-browse/main> push ``` diff --git a/transcripts/share-apis/code-browse/run.zsh b/transcripts/share-apis/code-browse/run.zsh new file mode 100755 index 0000000..c46e999 --- /dev/null +++ b/transcripts/share-apis/code-browse/run.zsh @@ -0,0 +1,50 @@ +#!/usr/bin/env zsh + +set -e + +source "../../transcript_helpers.sh" + +transcript_ucm transcript prelude.md + +typeset -A tests +# Add tests here: +tests=( + codebase-browse "/users/transcripts/projects/code-browse/branches/main/browse?namespace=names" + codebase-definition-by-name "/users/transcripts/projects/code-browse/branches/main/definitions/by-name/compoundTerm?relativeTo=names.apples" + codebase-definition-by-name-encoded "/users/transcripts/projects/code-browse/branches/main/definitions/by-name/%2F%2B%25?relativeTo=names" + codebase-definition-by-name-should-not-find-names-in-other-namespaces "/users/transcripts/projects/code-browse/branches/main/definitions/by-name/externalName?relativeTo=names" + codebase-definition-by-name-should-work-with-empty-perspective "/users/transcripts/projects/code-browse/branches/main/definitions/by-name/names.oranges.two" + codebase-definition-by-name-should-pretty-print-external-names-if-no-local-name "/users/transcripts/projects/code-browse/branches/main/definitions/by-name/referencesExternal?relativeTo=names" + codebase-definition-by-name-should-minimally-suffix "/users/transcripts/projects/code-browse/branches/main/definitions/by-name/oranges.two?relativeTo=names" + codebase-definition-by-name-should-minimally-suffix-again "/users/transcripts/projects/code-browse/branches/main/definitions/by-name/two?relativeTo=names.apples" + codebase-definition-by-hash-term "/users/transcripts/projects/code-browse/branches/main/definitions/by-hash/@dcgdua2lj6upd1ah5v0qp09gjsej0d77d87fu6qn8e2qrssnlnmuinoio46hiu53magr7qn8vnqke8ndt0v76700o5u8gcvo7st28jg" + codebase-definition-by-hash-constructor "/users/transcripts/projects/code-browse/branches/main/definitions/by-hash/@6kbe32g06nqg93cqub6ohqc4ql4o49ntgnunifds0t75qre6lacnbsr3evn8bkivj68ecbvmhkbak4dbg4fqertcpgb396rmo34tnh0@d0" + codebase-find "/users/transcripts/projects/code-browse/branches/main/find?query=oranges.tw" + codebase-namespace-by-name "/users/transcripts/projects/code-browse/branches/main/namespaces/by-name/names" + codebase-namespace-by-name-root "/users/transcripts/projects/code-browse/branches/main/namespaces/by-name/" + search "/search?query=te" + account "/account" + user-info "/user-info" +) + +cookie_jar="$(mktemp)" + +# Log in to the test user and save the credentials to use in tests. +echo "/local/user/transcripts/login" +curl -s --cookie-jar "$cookie_jar" http://localhost:5424/local/user/transcripts/login > /dev/null + +exit_code=0 + +for testname api_path in "${(@kv)tests}"; do + echo "${api_path}" + url="http://localhost:5424${api_path}" + result_file="$(mktemp)" + curl -L -s --cookie "$cookie_jar" -H "Accept: application/json" -w '{"status_code":%{http_code}}' "http://localhost:5424${api_path}" > "${result_file}" + jq --sort-keys -s '{"status": .[1].status_code, "body": .[0]}' > "./$testname.json" <"${result_file}" || { + echo "Failed to parse json response for ${url}:" + cat "${result_file}" >&2 + exit_code=1 + } +done + +exit "$exit_code" diff --git a/transcripts/share-apis/loose-code/search.json b/transcripts/share-apis/code-browse/search.json similarity index 100% rename from transcripts/share-apis/loose-code/search.json rename to transcripts/share-apis/code-browse/search.json diff --git a/transcripts/share-apis/loose-code/user-info.json b/transcripts/share-apis/code-browse/user-info.json similarity index 100% rename from transcripts/share-apis/loose-code/user-info.json rename to transcripts/share-apis/code-browse/user-info.json diff --git a/transcripts/share-apis/contribution-diffs/contribution-diff.json b/transcripts/share-apis/contribution-diffs/contribution-diff.json index 450951b..f02f232 100644 --- a/transcripts/share-apis/contribution-diffs/contribution-diff.json +++ b/transcripts/share-apis/contribution-diffs/contribution-diff.json @@ -450,9 +450,9 @@ ] }, "newRef": "diff-end", - "newRefHash": "#thfit26udtrt01fqmf7ocpbv5ocaffko68mrrjlsn5qgngb82ct2cefo6erdue4346r3hvqlkm1c1k86k7511ssklv8gilr7lt67648", + "newRefHash": "#1f9oqkrlfnkhnmfh29c9oiuvlbbta0j29nsmu4me709ber295aji2nuv2t8q7e6pfeji1ge1scdblb4qbg3uvlmcbuiesc8q88e0bqo", "oldRef": "diff-start", - "oldRefHash": "#vqdmhtakmfibustu5a0rebtfcr6j1e0hnn2ibv36ann6pj1s5ggfhofvio7hhjcb1ek6h4630mpqf1pvkt0rcfa2j2p924mjo4ctav0", + "oldRefHash": "#odojlhcu8m0iaajcjug8mkd84rqib8s273rf46rnn281trtqu56mgkogp2o71ajsmvpvamqo4lvotqj5kare46ci5t26m4oe2vpqjvo", "project": "@transcripts/namespace-diff" }, "status": [ diff --git a/transcripts/share-apis/contribution-diffs/namespace-diff.json b/transcripts/share-apis/contribution-diffs/namespace-diff.json index 450951b..f02f232 100644 --- a/transcripts/share-apis/contribution-diffs/namespace-diff.json +++ b/transcripts/share-apis/contribution-diffs/namespace-diff.json @@ -450,9 +450,9 @@ ] }, "newRef": "diff-end", - "newRefHash": "#thfit26udtrt01fqmf7ocpbv5ocaffko68mrrjlsn5qgngb82ct2cefo6erdue4346r3hvqlkm1c1k86k7511ssklv8gilr7lt67648", + "newRefHash": "#1f9oqkrlfnkhnmfh29c9oiuvlbbta0j29nsmu4me709ber295aji2nuv2t8q7e6pfeji1ge1scdblb4qbg3uvlmcbuiesc8q88e0bqo", "oldRef": "diff-start", - "oldRefHash": "#vqdmhtakmfibustu5a0rebtfcr6j1e0hnn2ibv36ann6pj1s5ggfhofvio7hhjcb1ek6h4630mpqf1pvkt0rcfa2j2p924mjo4ctav0", + "oldRefHash": "#odojlhcu8m0iaajcjug8mkd84rqib8s273rf46rnn281trtqu56mgkogp2o71ajsmvpvamqo4lvotqj5kare46ci5t26m4oe2vpqjvo", "project": "@transcripts/namespace-diff" }, "status": [ diff --git a/transcripts/share-apis/contributions/contribution-setup.output.md b/transcripts/share-apis/contributions/contribution-setup.output.md index 87c0771..1ce8f9b 100644 --- a/transcripts/share-apis/contributions/contribution-setup.output.md +++ b/transcripts/share-apis/contributions/contribution-setup.output.md @@ -25,14 +25,14 @@ bca-updates/main> push @transcripts/bca-updates/main I just created @transcripts/bca-updates on http://localhost:5424 - View it on Unison Share: @transcripts/bca-updates/main on http://localhost:5424 + View it here: @transcripts/bca-updates/main on http://localhost:5424 bca-updates/main> branch /feature-one Done. I've created the feature-one branch based off of main. - Tip: Use `merge /feature-one /main` to merge your work back - into the main branch. + Tip: To merge your work back into the main branch, first + `switch /main` then `merge /feature-one`. ``` ```unison @@ -54,15 +54,15 @@ bca-updates/feature-one> push @transcripts/bca-updates/feature-one I just created @transcripts/bca-updates/feature-one on http://localhost:5424 - View it on Unison Share: @transcripts/bca-updates/feature-one on http://localhost:5424 + View it here: @transcripts/bca-updates/feature-one on http://localhost:5424 bca-updates/feature-one> branch /feature-two Done. I've created the feature-two branch based off of feature-one. - Tip: Use `merge /feature-two /feature-one` to merge your work - back into the feature-one branch. + Tip: To merge your work back into the feature-one branch, + first `switch /feature-one` then `merge /feature-two`. ``` ```unison @@ -84,7 +84,7 @@ bca-updates/feature-two> push @transcripts/bca-updates/feature-two I just created @transcripts/bca-updates/feature-two on http://localhost:5424 - View it on Unison Share: @transcripts/bca-updates/feature-two on http://localhost:5424 + View it here: @transcripts/bca-updates/feature-two on http://localhost:5424 ``` See the script, we will create a contribution, then will merge and push branches to see how things change. diff --git a/transcripts/share-apis/contributions/merge-contribution-branches.output.md b/transcripts/share-apis/contributions/merge-contribution-branches.output.md index e0628b6..1d1d8c4 100644 --- a/transcripts/share-apis/contributions/merge-contribution-branches.output.md +++ b/transcripts/share-apis/contributions/merge-contribution-branches.output.md @@ -14,26 +14,13 @@ -- Merge the feature branch, then push the merged branch to main @transcripts/bca-updates/main> merge /feature-one - Here's what's changed in the current namespace after the - merge: - - Updates: - - 1. term : ##Text - ↓ - 2. term : ##Text - - Tip: You can use `todo` to see if this generated any work to - do in this namespace and `test` to run the tests. Or you - can use `undo` or `reflog` to undo the results of this - merge. - - Applying changes from patch... + I fast-forward merged @transcripts/bca-updates/feature-one + into @transcripts/bca-updates/main. @transcripts/bca-updates/main> push @transcripts/bca-updates/main Uploaded 1 entities. - View it on Unison Share: @transcripts/bca-updates/main on http://localhost:5424 + View it here: @transcripts/bca-updates/main on http://localhost:5424 ``` diff --git a/transcripts/share-apis/loose-code/codebase-namespace-by-name-root.json b/transcripts/share-apis/loose-code/codebase-namespace-by-name-root.json deleted file mode 100644 index 2cdb9d6..0000000 --- a/transcripts/share-apis/loose-code/codebase-namespace-by-name-root.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "body": { - "fqn": "", - "hash": "#sua4jpjqhiog33earcg00brqgcns8k8erjk50qee14qegeigh017m0a068sp1s1pruh7tqbcaeboa0evuae3k6irikg5da72ucvtbe0", - "readme": null - }, - "status": 200 -} diff --git a/transcripts/share-apis/loose-code/run.zsh b/transcripts/share-apis/loose-code/run.zsh deleted file mode 100755 index 5a8821d..0000000 --- a/transcripts/share-apis/loose-code/run.zsh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env zsh - -set -e - -source "../../transcript_helpers.sh" - -transcript_ucm transcript prelude.md - -typeset -A tests -# Add tests here: -tests=( - codebase-browse "/codebases/transcripts/browse?namespace=public.names" - codebase-definition-by-name "/codebases/transcripts/definitions/by-name/compoundTerm?relativeTo=public.names.apples" - codebase-definition-by-name-encoded "/codebases/transcripts/definitions/by-name/%2F%2B%25?relativeTo=public.names" - codebase-definition-by-name-should-not-find-names-in-other-namespaces "/codebases/transcripts/definitions/by-name/externalName?relativeTo=public.names" - codebase-definition-by-name-should-work-with-empty-perspective "/codebases/transcripts/definitions/by-name/public.names.oranges.two" - codebase-definition-by-name-should-pretty-print-external-names-if-no-local-name "/codebases/transcripts/definitions/by-name/referencesExternal?relativeTo=public.names" - codebase-definition-by-name-should-minimally-suffix "/codebases/transcripts/definitions/by-name/oranges.two?relativeTo=public.names" - codebase-definition-by-name-should-minimally-suffix-again "/codebases/transcripts/definitions/by-name/two?relativeTo=public.names.apples" - codebase-definition-by-hash-term "/codebases/transcripts/definitions/by-hash/@dcgdua2lj6upd1ah5v0qp09gjsej0d77d87fu6qn8e2qrssnlnmuinoio46hiu53magr7qn8vnqke8ndt0v76700o5u8gcvo7st28jg?relativeTo=public" - codebase-definition-by-hash-constructor "/codebases/transcripts/definitions/by-hash/@6kbe32g06nqg93cqub6ohqc4ql4o49ntgnunifds0t75qre6lacnbsr3evn8bkivj68ecbvmhkbak4dbg4fqertcpgb396rmo34tnh0@d0?relativeTo=public" - codebase-find "/codebases/transcripts/find?query=oranges.tw&relativeTo=public" - codebase-namespace-by-name "/codebases/transcripts/namespaces/by-name/public.names" - codebase-namespace-by-name-root "/codebases/transcripts/namespaces/by-name/" - search "/search?query=te" - account "/account" - user-info "/user-info" -) - -cookie_jar="$(mktemp)" - -# Log in to the test user and save the credentials to use in tests. -echo "/local/user/transcripts/login" -curl -s --cookie-jar "$cookie_jar" http://localhost:5424/local/user/transcripts/login > /dev/null - -exit_code=0 - -for testname api_path in "${(@kv)tests}"; do - echo "${api_path}" - url="http://localhost:5424${api_path}" - result_file="$(mktemp)" - curl -L -s --cookie "$cookie_jar" -H "Accept: application/json" -w '{"status_code":%{http_code}}' "http://localhost:5424${api_path}" > "${result_file}" - jq --sort-keys -s '{"status": .[1].status_code, "body": .[0]}' > "./$testname.json" <"${result_file}" || { - echo "Failed to parse json response for ${url}:" - cat "${result_file}" >&2 - exit_code=1 - } -done - -exit "$exit_code" diff --git a/transcripts/sync-apis/pull-without-history.md b/transcripts/sync-apis/pull-without-history.md index b5f9d0e..f3285c5 100644 --- a/transcripts/sync-apis/pull-without-history.md +++ b/transcripts/sync-apis/pull-without-history.md @@ -11,6 +11,7 @@ myproject/main> move.term x y myproject/main> move.term y z myproject/main> history myproject/main> push -.dest> pull.without-history @transcripts/myproject/main -.dest> history +myproject/main> branch.create-empty dest +myproject/dest> pull.without-history @transcripts/myproject/main +myproject/dest> history ``` diff --git a/transcripts/sync-apis/pull-without-history.output.md b/transcripts/sync-apis/pull-without-history.output.md index e8fb1b9..196ee9d 100644 --- a/transcripts/sync-apis/pull-without-history.output.md +++ b/transcripts/sync-apis/pull-without-history.output.md @@ -75,20 +75,24 @@ myproject/main> push I just created @transcripts/myproject on http://localhost:5424 - View it on Unison Share: @transcripts/myproject/main on http://localhost:5424 + View it here: @transcripts/myproject/main on http://localhost:5424 - ☝️ The namespace .dest is empty. +myproject/main> branch.create-empty dest -.dest> pull.without-history @transcripts/myproject/main + Done. I've created an empty branch myproject/dest. + + Tip: Use `merge /somebranch` to initialize this branch. + +myproject/dest> pull.without-history @transcripts/myproject/main Downloaded 1 entities. ✅ - Successfully updated the current namespace from + Successfully updated myproject/dest from @transcripts/myproject/main. -.dest> history +myproject/dest> history Note: The most recent namespace hash is immediately below this message. diff --git a/transcripts/sync-apis/sync.md b/transcripts/sync-apis/sync.md index bbce5c9..dcb1e6e 100644 --- a/transcripts/sync-apis/sync.md +++ b/transcripts/sync-apis/sync.md @@ -1,5 +1,6 @@ ```ucm:hide -.source> builtins.merge +.> project.create-empty proj +proj/main> builtins.merge ``` Create some types and values with deep-dependencies and cycles to ensure we have non-trivial components. @@ -22,14 +23,15 @@ ys = [!a, !b] :+ 3 ```ucm:hide -.source> add +proj/main> add ``` Push and pull it back. ```ucm -.source> push.create transcripts.public.code -.source> pull transcripts.public.code .pulled -.pulled> ls +proj/main> push @transcripts/proj/main +proj/main> branch.create-empty pulled +proj/pulled> pull @transcripts/proj/main +proj/pulled> ls ``` ```unison:hide @@ -38,41 +40,36 @@ newValue = 99 Do a fast-forward push. ```ucm -.source> add -.source> push transcripts.public.code +proj/main> add +proj/main> push ``` Do a non-fast-forward push. + ```ucm -.> fork source source2 +proj/main> branch /diverge ``` ```unison:hide -source.ff1 = 100 -source2.ff2 = 200 +diverge = 100 ``` -```ucm:error -.> add -.source> push transcripts.public.code -.source2> push transcripts.public.code -``` - -Pull and then try pushing again to resolve the issue. ```ucm -.source2> pull transcripts.public.code -.source2> push transcripts.public.code +proj/main> add +proj/main> push @transcripts/proj/main ``` -Create and pull some unrelated history. ```unison:hide -unrelated1.foo = 100 -unrelated2.foo = 200 +diverge = 200 ``` -```ucm -.> add -.> push.create transcripts.public.unrelated1 .unrelated1 -.> pull transcripts.public.unrelated1 .unrelated2 + +```ucm:error +proj/diverge> add +proj/diverge> push @transcripts/proj/main ``` -It looks like we don't have any guard against pulling an unrelated branch to a local location. +Pull to trigger local merge + +```ucm:error +proj/diverge> pull @transcripts/proj/main +``` diff --git a/transcripts/sync-apis/sync.output.md b/transcripts/sync-apis/sync.output.md index 6e2196f..3ff133b 100644 --- a/transcripts/sync-apis/sync.output.md +++ b/transcripts/sync-apis/sync.output.md @@ -36,21 +36,27 @@ ys = [!a, !b] :+ 3 ``` Push and pull it back. ```ucm -.source> push.create transcripts.public.code +proj/main> push @transcripts/proj/main - Uploaded 322 entities. + Uploaded 358 entities. - View it on Unison Share: https://share.unison-lang.org/@transcripts/p/code/latest/namespaces/public/code + I just created @transcripts/proj on http://localhost:5424 -.source> pull transcripts.public.code .pulled + View it here: @transcripts/proj/main on http://localhost:5424 - Downloaded 0 entities. +proj/main> branch.create-empty pulled + + Done. I've created an empty branch proj/pulled. + + Tip: Use `merge /somebranch` to initialize this branch. + +proj/pulled> pull @transcripts/proj/main ✅ - Successfully pulled into .pulled, which was empty. + Successfully pulled into proj/pulled, which was empty. -.pulled> ls +proj/pulled> ls 1. A (type) 2. A/ (2 terms) @@ -58,7 +64,7 @@ Push and pull it back. 4. B/ (2 terms) 5. a ('Nat) 6. b ('Nat) - 7. builtin/ (455 terms, 71 types) + 7. builtin/ (469 terms, 74 types) 8. xs (['{g} Nat]) 9. ys ([Nat]) @@ -69,102 +75,98 @@ newValue = 99 Do a fast-forward push. ```ucm -.source> add +proj/main> add ⍟ I've added these definitions: newValue : Nat -.source> push transcripts.public.code +proj/main> push Uploaded 3 entities. - View it on Unison Share: https://share.unison-lang.org/@transcripts/p/code/latest/namespaces/public/code + View it here: @transcripts/proj/main on http://localhost:5424 ``` Do a non-fast-forward push. + ```ucm -.> fork source source2 +proj/main> branch /diverge - Done. + Done. I've created the diverge branch based off of main. + + Tip: To merge your work back into the main branch, first + `switch /main` then `merge /diverge`. ``` ```unison -source.ff1 = 100 -source2.ff2 = 200 +diverge = 100 ``` ```ucm -.> add +proj/main> add ⍟ I've added these definitions: - source.ff1 : Nat - source2.ff2 : Nat + diverge : Nat -.source> push transcripts.public.code +proj/main> push @transcripts/proj/main Uploaded 3 entities. - View it on Unison Share: https://share.unison-lang.org/@transcripts/p/code/latest/namespaces/public/code - -.source2> push transcripts.public.code - - ❗️ - - There are some changes at transcripts.public.code that aren't - in the history you pushed. - - If you're sure you got the right paths, try `pull` to merge - these changes locally, then `push` again. - -``` -Pull and then try pushing again to resolve the issue. -```ucm -.source2> pull transcripts.public.code - - Downloaded 0 entities. - - Merging... - - Applying changes from patch... - -.source2> push transcripts.public.code - - Uploaded 5 entities. - - View it on Unison Share: https://share.unison-lang.org/@transcripts/p/code/latest/namespaces/public/code + View it here: @transcripts/proj/main on http://localhost:5424 ``` -Create and pull some unrelated history. ```unison -unrelated1.foo = 100 -unrelated2.foo = 200 +diverge = 200 ``` ```ucm -.> add +proj/diverge> add ⍟ I've added these definitions: - unrelated1.foo : Nat - (also named source.ff1 and source2.ff1) - unrelated2.foo : Nat - (also named source2.ff2) - -.> push.create transcripts.public.unrelated1 .unrelated1 + diverge : Nat - Uploaded 2 entities. +proj/diverge> push @transcripts/proj/main - View it on Unison Share: https://share.unison-lang.org/@transcripts/p/code/latest/namespaces/public/unrelated1 + @transcripts/proj/main on http://localhost:5424 has some + history that I don't know about. -.> pull transcripts.public.unrelated1 .unrelated2 +``` +Pull to trigger local merge - Downloaded 0 entities. +```ucm +proj/diverge> pull @transcripts/proj/main Merging... - Applying changes from patch... + I couldn't automatically merge remote @transcripts/proj/main + into proj/diverge. However, I've added the definitions that + need attention to the top of scratch.u. + + When you're done, you can run + + merge.commit + + to merge your changes back into diverge and delete the + temporary branch. Or, if you decide to cancel the merge + instead, you can run + + delete.branch /merge-remote-main-into-diverge + + to delete the temporary branch and switch back to diverge. + +``` +```unison:added-by-ucm scratch.u +-- proj/diverge +diverge : Nat +diverge = 200 + +-- @transcripts/proj/main +diverge : Nat +diverge = 100 + ``` -It looks like we don't have any guard against pulling an unrelated branch to a local location. + diff --git a/transcripts/sync-apis/write-other-user-without-permission.md b/transcripts/sync-apis/write-other-user-without-permission.md index dd4da07..3fd4726 100644 --- a/transcripts/sync-apis/write-other-user-without-permission.md +++ b/transcripts/sync-apis/write-other-user-without-permission.md @@ -1,7 +1,9 @@ ```unison:hide stuff = 300 ``` + ```ucm:error -.stuff> add -.stuff> push notme.public +.> project.create-empty proj +proj/main> add +proj/main> push @test/proj ``` diff --git a/transcripts/sync-apis/write-other-user-without-permission.output.md b/transcripts/sync-apis/write-other-user-without-permission.output.md index de8cfb7..d55aa36 100644 --- a/transcripts/sync-apis/write-other-user-without-permission.output.md +++ b/transcripts/sync-apis/write-other-user-without-permission.output.md @@ -3,18 +3,30 @@ stuff = 300 ``` ```ucm - ☝️ The namespace .stuff is empty. +.> project.create-empty proj -.stuff> add + 🎉 I've created the project proj. + + 🎨 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! + +proj/main> add ⍟ I've added these definitions: stuff : ##Nat -.stuff> push notme.public +proj/main> push @test/proj - ❗️ - - User @notme does not exist. + Unauthorized: Not permitted to create this project ``` diff --git a/transcripts/sync-apis/write-unsupported-path.md b/transcripts/sync-apis/write-unsupported-path.md deleted file mode 100644 index fdf40d5..0000000 --- a/transcripts/sync-apis/write-unsupported-path.md +++ /dev/null @@ -1,12 +0,0 @@ -```unison:hide:all -stuff = 300 -``` - -```ucm:hide -.path> add -``` - -Currently, only the `public namespace is writeable. -```ucm:error -.path> push.create transcripts.notpublic -``` diff --git a/transcripts/sync-apis/write-unsupported-path.output.md b/transcripts/sync-apis/write-unsupported-path.output.md deleted file mode 100644 index f438db3..0000000 --- a/transcripts/sync-apis/write-unsupported-path.output.md +++ /dev/null @@ -1,14 +0,0 @@ -Currently, only the `public namespace is writeable. -```ucm -.path> push.create transcripts.notpublic - - ❗️ - - Unison Share currently only supports sharing public code. This - is done by hosting code in a public namespace under your - handle. It looks like you were trying to push directly to the - `transcripts` handle. Try nesting under `public` like so: - - push.create transcripts.public.notpublic - -```