Skip to content
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
60 changes: 56 additions & 4 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -523,21 +523,21 @@
},
"scripts": {
"vscode:prepublish": "npm run compile && npm run package-web",
"copy-wasm": "mkdir -p out/flowr/tree-sitter && cp src/flowr/tree-sitter/*.wasm out/flowr/tree-sitter && mkdir -p node_modules/@eagleoutice/flowr/r-bridge/lang-4.x/tree-sitter/ && cp src/flowr/tree-sitter/*.wasm node_modules/@eagleoutice/flowr/r-bridge/lang-4.x/tree-sitter/",
"copy-wasm": "mkdir -p dist/node_modules/@eagleoutice/tree-sitter-r/ && mkdir -p dist/node_modules/web-tree-sitter && cp node_modules/@eagleoutice/tree-sitter-r/tree-sitter-r.wasm dist/node_modules/@eagleoutice/tree-sitter-r/ && cp node_modules/web-tree-sitter/tree-sitter.wasm dist/node_modules/web-tree-sitter/ && mkdir -p out/flowr/tree-sitter/ && cp node_modules/@eagleoutice/tree-sitter-r/tree-sitter-r.wasm node_modules/web-tree-sitter/tree-sitter.wasm out/flowr/tree-sitter/",
"compile": "npm run copy-wasm && tsc -p ./",
"watch": "npm run copy-wasm && tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "npx eslint src/",
"test": "vscode-test",
"generate-changelog": "git log ...$(git tag | tail -n 1) --pretty=format:'- %s' --reverse",
"browser": "vscode-test-web --extensionDevelopmentPath=. .",
"copy-wasm-web": "mkdir -p dist/web && cp src/flowr/tree-sitter/*.wasm dist/web",
"copy-wasm-web": "mkdir -p dist/web && cp node_modules/web-tree-sitter/tree-sitter.wasm dist/web && cp node_modules/@eagleoutice/tree-sitter-r/tree-sitter-r.wasm dist/web",
"compile-web": "npm run copy-wasm-web && webpack",
"package-web": "npm run copy-wasm-web && webpack --mode production --devtool hidden-source-map",
"watch-web": "npm run copy-wasm-web && webpack --watch"
},
"dependencies": {
"@eagleoutice/flowr": "^2.2.12",
"@eagleoutice/flowr": "^2.2.13",
"assert": "^2.1.0",
"browserify-zlib": "^0.2.0",
"constants-browserify": "^1.0.0",
Expand Down Expand Up @@ -579,4 +579,4 @@
"tsdoc/syntax": "off"
}
}
}
}
4 changes: 2 additions & 2 deletions src/flowr/internal-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as vscode from 'vscode';
import { BEST_R_MAJOR, MINIMUM_R_MAJOR, getConfig, getWasmRootPath, isVerbose, isWeb, updateStatusBar } from '../extension';
import { Settings } from '../settings';
import { graphToMermaid } from '@eagleoutice/flowr/util/mermaid/dfg';
import { extractCFG } from '@eagleoutice/flowr/util/cfg/cfg';
import type { FlowrSession, SliceReturn } from './utils';
import { consolidateNewlines, makeSliceElements } from './utils';
import type { RShellOptions } from '@eagleoutice/flowr/r-bridge/shell';
Expand All @@ -27,6 +26,7 @@ import type { SourceRange } from '@eagleoutice/flowr/util/range';
import { reconstructToCode } from '@eagleoutice/flowr/reconstruct/reconstruct';
import { doNotAutoSelect } from '@eagleoutice/flowr/reconstruct/auto-select/auto-select-defaults';
import { makeMagicCommentHandler } from '@eagleoutice/flowr/reconstruct/auto-select/magic-comments';
import { extractSimpleCfg } from '@eagleoutice/flowr/control-flow/extract-cfg';

const logLevelToScore = {
Silly: LogLevel.Silly,
Expand Down Expand Up @@ -268,7 +268,7 @@ export class FlowrInternalSession implements FlowrSession {
const result = await createNormalizePipeline(s, {
request: requestFromInput(consolidateNewlines(document.getText()))
}).allRemainingSteps();
return cfgToMermaid(extractCFG(result.normalize), result.normalize);
return cfgToMermaid(extractSimpleCfg(result.normalize), result.normalize);
}, 'cfg');
}

Expand Down
6 changes: 3 additions & 3 deletions src/flowr/server-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type { SourceRange } from '@eagleoutice/flowr/util/range';
import { establishInternalSession, getConfig, isVerbose, isWeb, updateStatusBar } from '../extension';
import type { ConnectionType } from '../settings';
import { Settings } from '../settings';
import { extractCFG } from '@eagleoutice/flowr/util/cfg/cfg';
import { normalizedAstToMermaid } from '@eagleoutice/flowr/util/mermaid/ast';
import { cfgToMermaid } from '@eagleoutice/flowr/util/mermaid/cfg';
import type { FlowrSession, SliceReturn } from './utils';
Expand All @@ -16,14 +15,15 @@ import { visitAst } from '@eagleoutice/flowr/r-bridge/lang-4.x/ast/model/process
import type { DataflowGraphJson } from '@eagleoutice/flowr/dataflow/graph/graph';
import { DataflowGraph } from '@eagleoutice/flowr/dataflow/graph/graph';
import type { NormalizedAst } from '@eagleoutice/flowr/r-bridge/lang-4.x/ast/model/processing/decorate';
import { BiMap } from '@eagleoutice/flowr/util/bimap';
import type { FlowrHelloResponseMessage } from '@eagleoutice/flowr/cli/repl/server/messages/message-hello';
import type { FileAnalysisResponseMessageJson } from '@eagleoutice/flowr/cli/repl/server/messages/message-analysis';
import type { SliceResponseMessage } from '@eagleoutice/flowr/cli/repl/server/messages/message-slice';
import type { Queries, QueryResults, SupportedQueryTypes } from '@eagleoutice/flowr/queries/query';
import type { SlicingCriteria } from '@eagleoutice/flowr/slicing/criterion/parse';
import type { FlowrReplOptions } from '@eagleoutice/flowr/cli/repl/core';
import { graphToMermaid } from '@eagleoutice/flowr/util/mermaid/dfg';
import { BiMap } from '@eagleoutice/flowr/util/collections/bimap';
import { extractSimpleCfg } from '@eagleoutice/flowr/control-flow/extract-cfg';

export class FlowrServerSession implements FlowrSession {

Expand Down Expand Up @@ -182,7 +182,7 @@ export class FlowrServerSession implements FlowrSession {
...response.results.normalize,
idMap: new BiMap()
};
return cfgToMermaid(extractCFG(normalize), normalize);
return cfgToMermaid(extractSimpleCfg(normalize), normalize);
}

async retrieveSlice(criteria: SlicingCriteria, document: vscode.TextDocument): Promise<SliceReturn> {
Expand Down
2 changes: 1 addition & 1 deletion src/flowr/terminals/flowr-repl.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as vscode from 'vscode';
import type { FlowrSession } from '../utils';
import { ansiFormatter } from '@eagleoutice/flowr/util/ansi';
import * as readline from 'readline';
import { Stream } from 'stream';
import { replCompleter } from '@eagleoutice/flowr/cli/repl/core';
import { ansiFormatter } from '@eagleoutice/flowr/util/text/ansi';

export function showRepl(context: vscode.ExtensionContext, session: FlowrSession) {
// check if we have a terminal already
Expand Down