Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to latest Depot #131

Merged
merged 6 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/quick-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ name: setup
runs:
using: composite
steps:
- name: Stable rustc
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: davidB/rust-cargo-make@v1
with:
version: '0.36.4'
- uses: actions-rs/[email protected]
with:
crate: cargo-insta
version: latest
use-tool-cache: true
- name: Install cargo-insta
run: cargo +stable install cargo-insta
shell: bash
- name: Gen bindings
run: cargo make init-bindings
shell: bash
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ runs:
using: composite
steps:
- uses: actions/checkout@v3

- name: Stable rustc
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true

- uses: davidB/rust-cargo-make@v1
with:
version: '0.36.4'

- uses: actions-rs/[email protected]
with:
crate: cargo-insta
version: latest
use-tool-cache: true
- name: Install cargo-insta
run: cargo +stable install cargo-insta
shell: bash

- name: Gen bindings
run: cargo make init-bindings
Expand Down
48 changes: 0 additions & 48 deletions frontend/.eslintrc.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions frontend/.prettierrc.cjs

This file was deleted.

43 changes: 43 additions & 0 deletions frontend/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"organizeImports": {
"enabled": true
},
"javascript": {
"formatter": {
"arrowParentheses": "asNeeded",
"trailingCommas": "none"
},
"jsxRuntime": "reactClassic"
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedImports": "warn",
"useExhaustiveDependencies": "off",
"useJsxKeyInIterable": "off"
},
"style": {
"noNonNullAssertion": "off",
"useConst": "off",
"noUselessElse": "off",
"noParameterAssign": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noArrayIndexKey": "off",
"noImplicitAnyLet": "off"
},
"complexity": {
"noBannedTypes": "off",
"noForEach": "off"
}
}
}
}
4 changes: 4 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"private": true,
"depot": {
"depot-version": "0.2.16"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/node": "^20.4.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
Expand Down
3 changes: 0 additions & 3 deletions frontend/packages/aquascope-editor/.eslintignore

This file was deleted.

18 changes: 0 additions & 18 deletions frontend/packages/aquascope-editor/.eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion frontend/packages/aquascope-editor/.prettierignore

This file was deleted.

29 changes: 14 additions & 15 deletions frontend/packages/aquascope-editor/src/editor-utils/boundaries.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { Line, Range } from "@codemirror/state";
import { Decoration, EditorView, WidgetType } from "@codemirror/view";
import type { Line, Range } from "@codemirror/state";
import { Decoration, type EditorView, WidgetType } from "@codemirror/view";
import classNames from "classnames";
import _ from "lodash";
import React, { useState } from "react";
import ReactDOM from "react-dom/client";

import {
import type {
AnalysisFacts,
BoundariesAnnotations,
PermissionsBoundary,
PermissionsBoundary
} from "../types";
import {
PermLetter,
type PermLetter,
flowChar,
hideLoanRegion,
hideMoveRegion,
Expand All @@ -22,7 +21,7 @@ import {
readChar,
showLoanRegion,
showMoveRegion,
writeChar,
writeChar
} from "./misc";

// FIXME: the tooltips are not currently being used. The tooltips
Expand Down Expand Up @@ -111,7 +110,7 @@ let PermChar = ({ content, names, act, showit, hideit }: PermCharProps) => {

let PermStack = ({
facts,
boundary,
boundary
}: {
facts: AnalysisFacts;
boundary: PermissionsBoundary;
Expand All @@ -131,7 +130,7 @@ let PermStack = ({
hideit: () => {
hideLoanRegion(facts, data.loan_read_refined, ["read"]);
hideMoveRegion(facts, data.path_moved, ["read"]);
},
}
},
{
content: writeChar,
Expand All @@ -145,7 +144,7 @@ let PermStack = ({
hideit: () => {
hideLoanRegion(facts, data.loan_write_refined, ["write"]);
hideMoveRegion(facts, data.path_moved, ["write"]);
},
}
},
{
content: ownChar,
Expand All @@ -159,16 +158,16 @@ let PermStack = ({
hideit: () => {
hideLoanRegion(facts, data.loan_drop_refined, ["own"]);
hideMoveRegion(facts, data.path_moved, ["own"]);
},
}
},
{
content: flowChar,
names: ["perm", "flow"],
exp: boundary.expecting_flow !== undefined,
act: !boundary.expecting_flow?.is_violation ?? false,
showit: () => void null,
hideit: () => void null,
},
hideit: () => void null
}
];

let icons = allIcons.filter(i => i.exp);
Expand Down Expand Up @@ -211,7 +210,7 @@ class BoundaryPointWidget extends WidgetType {
toi(this.boundary.expected.read),
toi(this.boundary.expected.write),
toi(this.boundary.expected.drop),
toi(this.boundary.expecting_flow !== undefined),
toi(this.boundary.expecting_flow !== undefined)
].reduce((a, b) => a + b, 0);
this.line = view.state.doc.lineAt(
linecolToPosition(boundary.location, view.state.doc)
Expand Down Expand Up @@ -254,7 +253,7 @@ export function makeBoundaryDecorations(
): Range<Decoration>[] {
return boundaries.map(b =>
Decoration.widget({
widget: new BoundaryPointWidget(view, facts, b, annotations),
widget: new BoundaryPointWidget(view, facts, b, annotations)
}).range(linecolToPosition(b.location, view.state.doc))
);
}
Loading
Loading