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

datacube: bug fixes and improve roundtrip #3806

Merged
merged 14 commits into from
Jan 14, 2025
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
9 changes: 9 additions & 0 deletions .changeset/dry-donuts-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@finos/legend-application-data-cube-deployment': patch
'@finos/legend-application-repl-deployment': patch
'@finos/legend-application-data-cube': patch
'@finos/legend-application-repl': patch
'@finos/legend-data-cube': patch
'@finos/legend-shared': patch
'@finos/legend-graph': patch
---
5 changes: 5 additions & 0 deletions .changeset/gentle-steaks-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-shared': major
---

**BREAKING CHANGE:** Reduced verbosity in array/list access method: renamed `getNullableLastEntry()` to `last()` and `getNonNullableEntry()` to `at()`; removed `getNullableEntry()` and `getNullableFirstEntry()` in favor of `x[0]`.
16 changes: 16 additions & 0 deletions .changeset/great-spies-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@finos/legend-extension-dsl-data-space-studio': patch
'@finos/legend-extension-dsl-data-quality': patch
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-data-cube': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-application-pure-ide': patch
'@finos/legend-application-studio': patch
'@finos/legend-application-query': patch
'@finos/legend-query-builder': patch
'@finos/legend-code-editor': patch
'@finos/legend-data-cube': patch
'@finos/legend-shared': patch
'@finos/legend-graph': patch
---
45 changes: 45 additions & 0 deletions .changeset/lucky-phones-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
'@finos/legend-application-data-cube-deployment': patch
'@finos/legend-application-data-cube-bootstrap': patch
'@finos/legend-application-pure-ide-deployment': patch
'@finos/legend-extension-dsl-data-space-studio': patch
'@finos/legend-application-studio-deployment': patch
'@finos/legend-extension-store-service-store': patch
'@finos/legend-vscode-extension-dependencies': patch
'@finos/legend-application-query-deployment': patch
'@finos/legend-application-studio-bootstrap': patch
'@finos/legend-application-query-bootstrap': patch
'@finos/legend-application-repl-deployment': patch
'@finos/legend-extension-dsl-data-quality': patch
'@finos/legend-extension-store-relational': patch
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-persistence': patch
'@finos/legend-extension-store-flat-data': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-extension-tracer-zipkin': patch
'@finos/legend-application-data-cube': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-extension-dsl-service': patch
'@finos/legend-application-pure-ide': patch
'@finos/legend-extension-assortment': patch
'@finos/legend-application-studio': patch
'@finos/legend-extension-dsl-text': patch
'@finos/legend-application-query': patch
'@finos/legend-application-repl': patch
'@finos/legend-server-showcase': patch
'@finos/legend-query-builder': patch
'@finos/legend-server-depot': patch
'@finos/legend-application': patch
'@finos/legend-code-editor': patch
'@finos/legend-server-sdlc': patch
'@finos/legend-data-cube': patch
'@finos/legend-dev-utils': patch
'@finos/stylelint-config-legend-studio': patch
'@finos/legend-storage': patch
'@finos/eslint-plugin-legend-studio': patch
'@finos/legend-shared': patch
'@finos/babel-preset-legend-studio': patch
'@finos/legend-graph': patch
'@finos/legend-lego': patch
'@finos/legend-art': patch
---
45 changes: 45 additions & 0 deletions .changeset/ten-numbers-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
'@finos/legend-application-data-cube-deployment': patch
'@finos/legend-application-data-cube-bootstrap': patch
'@finos/legend-application-pure-ide-deployment': patch
'@finos/legend-extension-dsl-data-space-studio': patch
'@finos/legend-application-studio-deployment': patch
'@finos/legend-extension-store-service-store': patch
'@finos/legend-vscode-extension-dependencies': patch
'@finos/legend-application-query-deployment': patch
'@finos/legend-application-studio-bootstrap': patch
'@finos/legend-application-query-bootstrap': patch
'@finos/legend-application-repl-deployment': patch
'@finos/legend-extension-dsl-data-quality': patch
'@finos/legend-extension-store-relational': patch
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-persistence': patch
'@finos/legend-extension-store-flat-data': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-extension-tracer-zipkin': patch
'@finos/legend-application-data-cube': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-extension-dsl-service': patch
'@finos/legend-application-pure-ide': patch
'@finos/legend-extension-assortment': patch
'@finos/legend-application-studio': patch
'@finos/legend-extension-dsl-text': patch
'@finos/legend-application-query': patch
'@finos/legend-application-repl': patch
'@finos/legend-server-showcase': patch
'@finos/legend-query-builder': patch
'@finos/legend-server-depot': patch
'@finos/legend-application': patch
'@finos/legend-code-editor': patch
'@finos/legend-server-sdlc': patch
'@finos/legend-data-cube': patch
'@finos/legend-dev-utils': patch
'@finos/stylelint-config-legend-studio': patch
'@finos/legend-storage': patch
'@finos/eslint-plugin-legend-studio': patch
'@finos/legend-shared': patch
'@finos/babel-preset-legend-studio': patch
'@finos/legend-graph': patch
'@finos/legend-lego': patch
'@finos/legend-art': patch
---
9 changes: 9 additions & 0 deletions .changeset/twenty-meals-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@finos/legend-application-data-cube-deployment': patch
'@finos/legend-application-repl-deployment': patch
'@finos/legend-application-data-cube': patch
'@finos/legend-application-repl': patch
'@finos/legend-data-cube': patch
'@finos/legend-shared': patch
'@finos/legend-graph': patch
---
2 changes: 1 addition & 1 deletion fixtures/legend-mock-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"devDependencies": {
"@finos/legend-dev-utils": "workspace:*",
"cross-env": "7.0.3",
"eslint": "9.17.0",
"eslint": "9.18.0",
"nodemon": "3.1.9",
"npm-run-all": "4.1.5",
"rimraf": "6.0.1",
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,25 +105,25 @@
"@finos/eslint-plugin-legend-studio": "workspace:*",
"@finos/legend-dev-utils": "workspace:*",
"@finos/stylelint-config-legend-studio": "workspace:*",
"@types/node": "22.10.5",
"@types/node": "22.10.6",
"chalk": "5.4.1",
"cross-env": "7.0.3",
"envinfo": "7.14.0",
"eslint": "9.17.0",
"eslint": "9.18.0",
"fs-extra": "11.2.0",
"husky": "9.1.7",
"inquirer": "12.3.0",
"inquirer": "12.3.2",
"jest": "29.7.0",
"lint-staged": "15.3.0",
"micromatch": "4.0.8",
"npm-run-all": "4.1.5",
"prettier": "3.4.2",
"prettier-plugin-tailwindcss": "0.6.9",
"rimraf": "6.0.1",
"sass": "1.83.1",
"sass": "1.83.4",
"semver": "7.6.3",
"sort-package-json": "2.12.0",
"stylelint": "16.12.0",
"sort-package-json": "2.13.0",
"stylelint": "16.13.2",
"typedoc": "0.27.6",
"typescript": "5.7.3",
"yargs": "17.7.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@babel/core": "7.26.0",
"@babel/helper-plugin-utils": "7.25.9",
"@babel/helper-plugin-utils": "7.26.5",
"@babel/plugin-syntax-import-attributes": "7.26.0",
"@babel/preset-env": "7.26.0",
"@babel/preset-react": "7.26.3",
Expand All @@ -41,7 +41,7 @@
},
"devDependencies": {
"cross-env": "7.0.3",
"eslint": "9.17.0",
"eslint": "9.18.0",
"rimraf": "6.0.1",
"typescript": "5.7.3"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
},
"dependencies": {
"@babel/core": "7.26.0",
"@babel/eslint-parser": "7.25.9",
"@eslint/js": "9.17.0",
"@typescript-eslint/eslint-plugin": "8.19.1",
"@typescript-eslint/parser": "8.19.1",
"eslint": "9.17.0",
"eslint-config-prettier": "9.1.0",
"@babel/eslint-parser": "7.26.5",
"@eslint/js": "9.18.0",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"eslint": "9.18.0",
"eslint-config-prettier": "10.0.1",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.37.3",
"eslint-plugin-react": "7.37.4",
"eslint-plugin-react-hooks": "5.1.0",
"globals": "15.14.0",
"micromatch": "4.0.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const TYPESCRIPT_RULES = {

'@typescript-eslint/unbound-method': WARN,
'@typescript-eslint/no-redundant-type-constituents': WARN,
'@typescript-eslint/no-non-null-assertion': WARN,

// NOTE: since we turn on TS option --exactOptionalPropertyTypes, this rule mistakenly flags ?: ... | undefined as violation
// so we temporarily turn it off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@
"@finos/legend-data-cube": "workspace:*",
"@finos/legend-extension-dsl-data-space": "workspace:*",
"@finos/legend-shared": "workspace:*",
"@types/react": "19.0.4",
"@types/react": "19.0.7",
"react": "19.0.0"
},
"devDependencies": {
"@finos/legend-dev-utils": "workspace:*",
"cross-env": "7.0.3",
"eslint": "9.17.0",
"eslint": "9.18.0",
"npm-run-all": "4.1.5",
"rimraf": "6.0.1",
"sass": "1.83.1",
"sass": "1.83.4",
"typescript": "5.7.3"
},
"publishConfig": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@finos/legend-dev-utils": "workspace:*",
"copy-webpack-plugin": "12.0.2",
"cross-env": "7.0.3",
"eslint": "9.17.0",
"eslint": "9.18.0",
"npm-run-all": "4.1.5",
"rimraf": "6.0.1",
"tailwindcss": "3.4.17",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ html {
font-family: Roboto, sans-serif;
overflow-y: hidden;
}

/*
* Disable overscroll that causes accidental back navigation
* See https://stackoverflow.com/questions/17474930/disable-chrome-two-fingers-back-forward-swipe
*/
html,
body {
overscroll-behavior-x: none;
}
8 changes: 4 additions & 4 deletions packages/legend-application-data-cube/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"@finos/legend-server-depot": "workspace:*",
"@finos/legend-shared": "workspace:*",
"@finos/legend-storage": "workspace:*",
"@types/react": "19.0.4",
"@types/react-dom": "19.0.2",
"@types/react": "19.0.7",
"@types/react-dom": "19.0.3",
"mobx": "6.13.5",
"mobx-react-lite": "4.1.0",
"react": "19.0.0",
Expand All @@ -63,11 +63,11 @@
"@finos/legend-dev-utils": "workspace:*",
"@jest/globals": "29.7.0",
"cross-env": "7.0.3",
"eslint": "9.17.0",
"eslint": "9.18.0",
"jest": "29.7.0",
"npm-run-all": "4.1.5",
"rimraf": "6.0.1",
"sass": "1.83.1",
"sass": "1.83.4",
"typescript": "5.7.3"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ export const LegendDataCubeQueryBuilder = withLegendDataCubeQueryBuilderStore(
LegendDataCubeSettingStorageKey.DATA_CUBE,
) as DataCubeSettingValues | undefined,
},
onSettingsChanged(values) {
onSettingsChanged(event) {
application.settingService.persistValue(
LegendDataCubeSettingStorageKey.DATA_CUBE,
values,
event.values,
);
},
documentationUrl: application.documentationService.url,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import {
assertErrorThrown,
NetworkClientError,
HttpStatus,
getNonNullableEntry,
at,
assertType,
} from '@finos/legend-shared';
import type { LegendDataCubeApplicationStore } from './LegendDataCubeBaseStore.js';
Expand Down Expand Up @@ -171,7 +171,7 @@ export class LegendDataCubeDataCubeEngine extends DataCubeEngine {
),
),
);
source.query = getNonNullableEntry(source.lambda.body, 0);
source.query = at(source.lambda.body, 0);
// TODO: handle parameter values
try {
source.columns = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
"@finos/legend-application-pure-ide": "workspace:*",
"@finos/legend-art": "workspace:*",
"@finos/legend-lego": "workspace:*",
"@types/react": "19.0.4",
"@types/react": "19.0.7",
"react": "19.0.0"
},
"devDependencies": {
"@finos/legend-dev-utils": "workspace:*",
"copy-webpack-plugin": "12.0.2",
"cross-env": "7.0.3",
"eslint": "9.17.0",
"eslint": "9.18.0",
"npm-run-all": "4.1.5",
"rimraf": "6.0.1",
"typescript": "5.7.3",
Expand Down
8 changes: 4 additions & 4 deletions packages/legend-application-pure-ide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"@finos/legend-graph": "workspace:*",
"@finos/legend-lego": "workspace:*",
"@finos/legend-shared": "workspace:*",
"@types/react": "19.0.4",
"@types/react-dom": "19.0.2",
"@types/react": "19.0.7",
"@types/react-dom": "19.0.3",
"mobx": "6.13.5",
"mobx-react-lite": "4.1.0",
"monaco-editor": "0.52.2",
Expand All @@ -64,11 +64,11 @@
"@finos/legend-dev-utils": "workspace:*",
"@jest/globals": "29.7.0",
"cross-env": "7.0.3",
"eslint": "9.17.0",
"eslint": "9.18.0",
"jest": "29.7.0",
"npm-run-all": "4.1.5",
"rimraf": "6.0.1",
"sass": "1.83.1",
"sass": "1.83.4",
"typescript": "5.7.3"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import { useApplicationStore, useCommands } from '@finos/legend-application';
import { clsx, Dialog, WordWrapIcon } from '@finos/legend-art';
import { usePureIDEStore } from '../PureIDEStoreProvider.js';
import {
getNullableFirstEntry,
getNullableLastEntry,
last,
guaranteeNonNullable,
returnUndefOnError,
} from '@finos/legend-shared';
Expand All @@ -43,12 +42,8 @@ const getPositionFromGoToLinePromptInputValue = (
return [1, undefined];
}
return [
returnUndefOnError(() =>
parseInt(guaranteeNonNullable(getNullableFirstEntry(parts))),
) ?? 1,
returnUndefOnError(() =>
parseInt(guaranteeNonNullable(getNullableLastEntry(parts))),
),
returnUndefOnError(() => parseInt(guaranteeNonNullable(parts[0]))) ?? 1,
returnUndefOnError(() => parseInt(guaranteeNonNullable(last(parts)))),
];
};

Expand Down
Loading
Loading