Skip to content

Commit

Permalink
Bump Primer pin for edge flavor support (#1098)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgefst authored Nov 23, 2023
2 parents 6c8719c + 145ab91 commit eb1bbff
Show file tree
Hide file tree
Showing 10 changed files with 947 additions and 639 deletions.
2 changes: 1 addition & 1 deletion argocd/base/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
# Note: use the *dev* version of the package here, so that
# PRs can deploy `primer-service` container images that have
# not yet been merged to `primer` `main`.
image: ghcr.io/hackworthltd/primer-service-dev:git-e8e9f14d326e82e0814a79185a1246327abc62f7
image: ghcr.io/hackworthltd/primer-service-dev:git-4a105b7c084cdbf599acb2bc5bb9283d0eae46ff
ports:
- containerPort: 8081
env:
Expand Down
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# Note: don't override any of primer's Nix flake inputs, or else
# we won't hit its binary cache.
primer.url = github:hackworthltd/primer/e8e9f14d326e82e0814a79185a1246327abc62f7;
primer.url = github:hackworthltd/primer/4a105b7c084cdbf599acb2bc5bb9283d0eae46ff;

flake-parts.url = "github:hercules-ci/flake-parts";
};
Expand Down
116 changes: 70 additions & 46 deletions src/components/TreeReactFlow/TreeReactFlow.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,37 @@ const typeDef1: TypeDef = {
nodeId: "1111",
childTrees: [
{
body: { tag: "NoBody", contents: "KType" },
nodeId: "1112",
childTrees: [],
fst: "FunIn",
snd: {
body: { tag: "NoBody", contents: "KType" },
nodeId: "1112",
childTrees: [],
},
},
{
body: { tag: "NoBody", contents: "KFun" },
nodeId: "1113",
childTrees: [
{
body: { tag: "NoBody", contents: "KHole" },
nodeId: "1114",
childTrees: [],
},
{
body: { tag: "NoBody", contents: "KType" },
nodeId: "1115",
childTrees: [],
},
],
fst: "FunOut",
snd: {
body: { tag: "NoBody", contents: "KFun" },
nodeId: "1113",
childTrees: [
{
fst: "FunIn",
snd: {
body: { tag: "NoBody", contents: "KHole" },
nodeId: "1114",
childTrees: [],
},
},
{
fst: "FunOut",
snd: {
body: { tag: "NoBody", contents: "KType" },
nodeId: "1115",
childTrees: [],
},
},
],
},
},
],
},
Expand Down Expand Up @@ -142,43 +154,55 @@ const typeDef1: TypeDef = {
body: { tag: "NoBody", contents: "TApp" },
childTrees: [
{
nodeId: "1102",
body: { tag: "NoBody", contents: "TApp" },
childTrees: [
{
nodeId: "1103",
body: {
tag: "TextBody",
contents: {
fst: "TVar",
snd: { baseName: "b" },
fst: "AppFun",
snd: {
nodeId: "1102",
body: { tag: "NoBody", contents: "TApp" },
childTrees: [
{
fst: "AppFun",
snd: {
nodeId: "1103",
body: {
tag: "TextBody",
contents: {
fst: "TVar",
snd: { baseName: "b" },
},
},
childTrees: [],
},
},
childTrees: [],
},
{
nodeId: "1104",
body: {
tag: "TextBody",
contents: {
fst: "TCon",
snd: { baseName: "Bool" },
{
fst: "AppArg",
snd: {
nodeId: "1104",
body: {
tag: "TextBody",
contents: {
fst: "TCon",
snd: { baseName: "Bool" },
},
},
childTrees: [],
},
},
childTrees: [],
},
],
],
},
},
{
nodeId: "1105",
body: {
tag: "TextBody",
contents: {
fst: "TCon",
snd: { baseName: "Pair" },
fst: "AppArg",
snd: {
nodeId: "1105",
body: {
tag: "TextBody",
contents: {
fst: "TCon",
snd: { baseName: "Pair" },
},
},
childTrees: [],
},
childTrees: [],
},
],
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/TreeReactFlow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -523,14 +523,14 @@ const augmentTree = async <T, E>(
f: (tree: APITreeNode) => Promise<[T, (child: T, isRight: boolean) => E]>
): Promise<Tree<T, E>> => {
const childTrees = await Promise.all(
tree.childTrees.map((t) => augmentTree(t, f))
tree.childTrees.map((t) => augmentTree(t.snd, f))
);
const [node, makeEdge] = await f({
children: tree.childTrees.length + (tree.rightChild ? 1 : 0),
...tree,
});
const rightChild = await (tree.rightChild
? augmentTree(tree.rightChild, f)
? augmentTree(tree.rightChild.snd, f)
: undefined);
return {
...(rightChild
Expand Down
Loading

0 comments on commit eb1bbff

Please sign in to comment.