Skip to content

Commit 7c39995

Browse files
authored
bump flowr (#367)
* wip: bump flowr * fixed static slice * update linter and subsequent errors * fixed various issues causing tests not to run and then fail * what * various additional test fixes * don't re-activate since example tests don't do it either * fixed hover values keeping a dead session alive
1 parent ea5f06b commit 7c39995

30 files changed

Lines changed: 2219 additions & 1562 deletions

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
# (https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions)
2828
uses: coactions/setup-xvfb@v1
2929
with:
30-
run: npm run test
30+
run: npm run test -- --forbid-only

package-lock.json

Lines changed: 1727 additions & 1211 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@
783783
"watch-web": "webpack --watch"
784784
},
785785
"dependencies": {
786-
"@eagleoutice/flowr": "^2.9.10",
786+
"@eagleoutice/flowr": "^2.10.1",
787787
"assert": "^2.1.0",
788788
"browserify-zlib": "^0.2.0",
789789
"constants-browserify": "^1.0.0",
@@ -798,18 +798,18 @@
798798
"util": "^0.12.5"
799799
},
800800
"devDependencies": {
801-
"@eagleoutice/eslint-config-flowr": "^1.0.19",
802-
"@eslint/eslintrc": "^3.2.0",
803-
"@eslint/js": "^9.20.0",
804-
"@types/mocha": "^10.0.6",
801+
"@eagleoutice/eslint-config-flowr": "^1.0.36",
802+
"@eslint/eslintrc": "^3.3.3",
803+
"@eslint/js": "^9.39.2",
804+
"@types/mocha": "^10.0.10",
805805
"@types/node": "22.x",
806806
"@types/semver": "^7.5.8",
807807
"@types/vscode": "^1.92.0",
808808
"@types/webpack-env": "^1.16.0",
809809
"@types/ws": "^8.5.10",
810-
"@vscode/test-cli": "^0.0.6",
811-
"@vscode/test-electron": "^2.3.9",
812-
"@vscode/test-web": "^0.0.78",
810+
"@vscode/test-cli": "^0.0.12",
811+
"@vscode/test-electron": "^2.5.2",
812+
"@vscode/test-web": "^0.0.80",
813813
"copy-webpack-plugin": "^12.0.2",
814814
"ifdef-loader": "^2.3.2",
815815
"ts-essentials": "^10.1.1",

src/configurable-refresher.ts

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { AsyncOrSync } from 'ts-essentials';
22
import type { RefresherConfigKeys } from './settings';
3-
import { Settings , getConfig } from './settings';
3+
import { Settings, getConfig } from './settings';
44
import * as vscode from 'vscode';
55

66

@@ -13,7 +13,7 @@ export interface ConfigurableRefresherConstructor {
1313
name: string;
1414
/**
1515
* The keys that are used to configure the refresher by the user,
16-
* or to fix the values to be used
16+
* or to fix the values to be used
1717
*/
1818
keys: RefresherConfigKeys & { type?: undefined } | {
1919
type: 'fixed';
@@ -22,7 +22,7 @@ export interface ConfigurableRefresherConstructor {
2222
interval: number;
2323
}
2424
/**
25-
* The function that should be called, when the content should be updated
25+
* The function that should be called, when the content should be updated
2626
* according to the policy configured by the config
2727
*/
2828
refreshCallback: Callback<void>;
@@ -32,7 +32,7 @@ export interface ConfigurableRefresherConstructor {
3232
configChangedCallback?: Callback<void>;
3333
/**
3434
* (optional) The function that should be called, when the user opens a non supported file
35-
* (i.e. not an R file), and the content should be cleared
35+
* (i.e. not an R file), and the content should be cleared
3636
*/
3737
clearCallback?: Callback<void>;
3838
/**
@@ -47,7 +47,7 @@ export interface ConfigurableRefresherConstructor {
4747
}
4848

4949
export const enum RefreshType {
50-
Never = 'never',
50+
Never = 'never',
5151
Interval = 'interval',
5252
Adaptive = 'adaptive',
5353
OnSave = 'on save',
@@ -75,7 +75,7 @@ export class ConfigurableRefresher {
7575

7676
constructor(c: ConfigurableRefresherConstructor) {
7777
this.spec = c;
78-
78+
7979
this.disposables.push(vscode.workspace.onDidChangeConfiguration(e => {
8080
if(!e.affectsConfiguration(Settings.Category)) {
8181
return;
@@ -108,7 +108,7 @@ export class ConfigurableRefresher {
108108

109109
/**
110110
* Gets called immediatly before running the refreshCallback to avoid unnecessary updates.
111-
* Can be overriden by @see ConfigurableRefresherConstructor.shouldUpdateHook
111+
* Can be overriden by {@link ConfigurableRefresherConstructor.shouldUpdateHook}
112112
*/
113113
private shouldUpdate(): boolean {
114114
if(!vscode.window.activeTextEditor) {
@@ -167,7 +167,7 @@ export class ConfigurableRefresher {
167167
private static registerRefresherForOnChanged(refresher: ConfigurableRefresher) {
168168
if(!ConfigurableRefresher.documentChangedDisposable) {
169169
ConfigurableRefresher.documentChangedDisposable = vscode.workspace.onDidChangeTextDocument((e) => {
170-
ConfigurableRefresher.onTextDocumentChanged(e);
170+
ConfigurableRefresher.onTextDocumentChanged(e);
171171
});
172172
}
173173

@@ -176,7 +176,7 @@ export class ConfigurableRefresher {
176176

177177
private update() {
178178
this.spec.output.append(`[${this.spec.name}] Updating Configuration`);
179-
179+
180180
if(this.activeInterval) {
181181
clearInterval(this.activeInterval);
182182
this.activeInterval = undefined;
@@ -204,11 +204,11 @@ export class ConfigurableRefresher {
204204
}
205205
});
206206
} else {
207-
this.activeDisposable = vscode.workspace.onDidChangeTextDocument(e => {
207+
this.activeDisposable = vscode.workspace.onDidChangeTextDocument(e => {
208208
if(isChangeRelevant(e)) {
209209
this.runRefreshCallback();
210210
}
211-
211+
212212
if(getActiveEditorCharLength() > breakOff) {
213213
this.update();
214214
}
@@ -233,13 +233,16 @@ function getActiveEditorCharLength() {
233233
}
234234

235235
function isChangeRelevant(e: vscode.TextDocumentChangeEvent): boolean {
236-
return e.contentChanges.length > 0
236+
return e.contentChanges.length > 0
237237
&& isRTypeLanguage(vscode.window.activeTextEditor?.document)
238-
&& e.document === vscode.window.activeTextEditor?.document
238+
&& e.document === vscode.window.activeTextEditor?.document
239239
&& e.document.version >= (vscode.window.activeTextEditor?.document.version ?? 0);
240240
}
241241

242242

243+
/**
244+
*
245+
*/
243246
export function isRTypeLanguage(doc?: vscode.TextDocument): doc is vscode.TextDocument {
244247
return !!doc && TriggerOnLanguageIds.indexOf(doc.languageId) !== -1;
245-
}
248+
}

src/criteria-slicer.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import { rangeToVscodeRange, type SliceReturn } from './flowr/utils';
1010
import type { DecoTypes } from './slice';
1111
import { displaySlice, makeSliceDecorationTypes } from './slice';
1212
import { positionSlicers } from './position-slicer';
13-
import { Settings , getConfig } from './settings';
13+
import { Settings, getConfig } from './settings';
1414
import type { SlicingCriteria } from '@eagleoutice/flowr/slicing/criterion/parse';
1515
import type { NormalizedAst } from '@eagleoutice/flowr/r-bridge/lang-4.x/ast/model/processing/decorate';
1616
import type { NodeId } from '@eagleoutice/flowr/r-bridge/lang-4.x/ast/model/processing/node-id';
1717
import type { DataflowInformation } from '@eagleoutice/flowr/dataflow/info';
18-
import { SliceDirection } from '@eagleoutice/flowr/core/steps/all/static-slicing/00-slice';
18+
import { SliceDirection } from '@eagleoutice/flowr/util/slice-direction';
1919

2020

2121
const criteriaSlicerAuthority = 'criteria-slicer';
@@ -24,6 +24,9 @@ const criteriaSlicerPath = 'Dependency Slice';
2424

2525
// currently only one instance is used and never disposed
2626
let criteriaSlicer: CriteriaSlicer | undefined;
27+
/**
28+
*
29+
*/
2730
export function getCriteriaSlicer(): CriteriaSlicer {
2831
if(criteriaSlicer) {
2932
criteriaSlicer.disposeCurrent();

src/doc-provider.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ export class ReconstructionContentProvider implements vscode.TextDocumentContent
4646
}
4747
}
4848

49+
/**
50+
*
51+
*/
4952
export function makeUri(authority: string, path: string){
5053
if(authority && path && !path.startsWith('/')){
5154
path = '/' + path;
@@ -58,6 +61,9 @@ export function makeUri(authority: string, path: string){
5861
return uri;
5962
}
6063

64+
/**
65+
*
66+
*/
6167
export async function showUri(uri: vscode.Uri, language: string = 'r', viewColumn: vscode.ViewColumn = vscode.ViewColumn.Beside): Promise<Thenable<vscode.TextEditor>> {
6268
for(const editor of vscode.window.visibleTextEditors){
6369
if(editor.document.uri.toString() === uri.toString()){
@@ -79,11 +85,14 @@ export async function showUri(uri: vscode.Uri, language: string = 'r', viewColum
7985
setTimeout(() => {
8086
editor.revealRange(lastLine.range, vscode.TextEditorRevealType.Default);
8187
}, 50);
82-
88+
8389
return editor;
8490
}
8591

8692
let reconstructionContentProvider: ReconstructionContentProvider | undefined;
93+
/**
94+
*
95+
*/
8796
export function getReconstructionContentProvider(): ReconstructionContentProvider {
8897
if(!reconstructionContentProvider) {
8998
reconstructionContentProvider = new ReconstructionContentProvider();

0 commit comments

Comments
 (0)