Skip to content

Commit f55f40f

Browse files
committed
Fix pped building
1 parent 833a4ec commit f55f40f

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

codebase2/codebase-sqlite/U/Codebase/Sqlite/Queries.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,8 +2032,8 @@ getTransitiveDependentsWithinScope scope query = do
20322032
WITH RECURSIVE
20332033
dependents_index_in_scope AS (
20342034
SELECT *
2035-
FROM dependents_index
2036-
WHERE (dependent_object_id, dependent_component_index) IN (
2035+
FROM dependents_index d
2036+
WHERE (d.dependent_object_id, d.dependent_component_index) IN (
20372037
SELECT object_id, component_index
20382038
FROM $scopeTableName
20392039
)

unison-share-api/src/Unison/Server/Local/Endpoints/DefinitionSummary.hs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,15 @@ where
1919

2020
import Control.Monad.Reader
2121
import Servant (Capture, QueryParam, (:>))
22-
import U.Codebase.Causal qualified as V2Causal
2322
import U.Codebase.HashTags (CausalHash)
24-
import U.Codebase.Sqlite.NameLookups (PathSegments (..))
25-
import U.Codebase.Sqlite.Operations qualified as Ops
2623
import Unison.Codebase (Codebase)
2724
import Unison.Codebase qualified as Codebase
2825
import Unison.Codebase.Path qualified as Path
2926
import Unison.Codebase.ShortCausalHash (ShortCausalHash)
3027
import Unison.HashQualified qualified as HQ
3128
import Unison.Name (Name)
32-
import Unison.NameSegment.Internal (NameSegment (NameSegment))
3329
import Unison.Parser.Ann (Ann)
3430
import Unison.Prelude
35-
import Unison.PrettyPrintEnvDecl.Sqlite qualified as PPESqlite
3631
import Unison.Reference (Reference)
3732
import Unison.Reference qualified as Reference
3833
import Unison.Referent (Referent)
@@ -71,11 +66,10 @@ serveTermSummary ::
7166
Backend IO TermSummary
7267
serveTermSummary codebase referent mayName root relativeTo mayWidth = do
7368
let relativeToPath = fromMaybe mempty relativeTo
74-
namesPerspective <- Backend.hoistBackend (Codebase.runTransaction codebase) do
75-
root <- Backend.normaliseRootCausalHash root
76-
namesPerspective <- lift $ Ops.namesPerspectiveForRootAndPath (V2Causal.valueHash root) (coerce $ Path.toList relativeToPath)
77-
pure namesPerspective
78-
let mkPPED deps = PPESqlite.ppedForReferences namesPerspective deps
69+
root <- Backend.hoistBackend (Codebase.runTransaction codebase) do
70+
Backend.normaliseRootCausalHash root
71+
(_, ppe) <- Backend.namesAtPathFromRootBranchHash codebase root relativeToPath
72+
let mkPPED _deps = pure ppe
7973
Backend.termSummaryForReferent codebase referent mayName mkPPED mayWidth
8074

8175
type TypeSummaryAPI =

0 commit comments

Comments
 (0)