@eagleoutice/flowr 2.12.3 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -95
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +3 -3
- package/abstract-interpretation/data-frame/dataframe-domain.js +14 -6
- package/abstract-interpretation/data-frame/semantics.js +12 -16
- package/abstract-interpretation/domains/abstract-domain.d.ts +46 -44
- package/abstract-interpretation/domains/abstract-domain.js +146 -6
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +16 -25
- package/abstract-interpretation/domains/bounded-set-domain.js +22 -69
- package/abstract-interpretation/domains/interval-domain.d.ts +27 -36
- package/abstract-interpretation/domains/interval-domain.js +111 -146
- package/abstract-interpretation/domains/lattice.d.ts +3 -3
- package/abstract-interpretation/domains/multi-value-state-domain.js +3 -3
- package/abstract-interpretation/domains/partial-product-domain.d.ts +12 -19
- package/abstract-interpretation/domains/partial-product-domain.js +21 -54
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +8 -12
- package/abstract-interpretation/domains/positive-interval-domain.js +21 -50
- package/abstract-interpretation/domains/product-domain.d.ts +1 -1
- package/abstract-interpretation/domains/product-domain.js +4 -4
- package/abstract-interpretation/domains/set-range-domain.d.ts +60 -56
- package/abstract-interpretation/domains/set-range-domain.js +141 -200
- package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +17 -23
- package/abstract-interpretation/domains/set-upper-bound-domain.js +59 -103
- package/abstract-interpretation/domains/singleton-domain.d.ts +15 -18
- package/abstract-interpretation/domains/singleton-domain.js +33 -72
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +12 -16
- package/abstract-interpretation/domains/state-abstract-domain.js +36 -126
- package/abstract-interpretation/domains/state-domain-like.d.ts +2 -2
- package/abstract-interpretation/domains/value-abstract-domain.d.ts +120 -0
- package/abstract-interpretation/domains/{satisfiable-domain.js → value-abstract-domain.js} +14 -2
- package/benchmark/slicer.d.ts +2 -2
- package/benchmark/slicer.js +6 -5
- package/cli/common/options.d.ts +20 -0
- package/cli/common/options.js +4 -0
- package/cli/common/scripts-info.d.ts +20 -0
- package/cli/flowr-main-options.d.ts +4 -0
- package/cli/flowr-main-options.js +5 -0
- package/cli/flowr.d.ts +5 -0
- package/cli/flowr.js +15 -7
- package/cli/repl/commands/repl-commands.d.ts +8 -0
- package/cli/repl/commands/repl-commands.js +16 -3
- package/cli/repl/commands/repl-query.js +50 -20
- package/cli/repl/commands/repl-signature.js +2 -2
- package/cli/repl/core.d.ts +14 -5
- package/cli/repl/core.js +32 -17
- package/cli/repl/parser/slice-query-parser.d.ts +69 -8
- package/cli/repl/parser/slice-query-parser.js +82 -13
- package/cli/repl/path-input.d.ts +6 -0
- package/cli/repl/path-input.js +41 -0
- package/cli/repl/print-version.js +3 -5
- package/cli/slicer-app.d.ts +4 -0
- package/cli/slicer-app.js +4 -2
- package/config.d.ts +56 -6
- package/config.js +134 -12
- package/control-flow/control-flow-graph.d.ts +3 -2
- package/control-flow/control-flow-graph.js +34 -14
- package/control-flow/semantic-cfg-guided-visitor.d.ts +3 -0
- package/control-flow/semantic-cfg-guided-visitor.js +3 -0
- package/core/steps/all/static-slicing/10-reconstruct.d.ts +6 -0
- package/core/steps/all/static-slicing/10-reconstruct.js +3 -1
- package/data/r-base-packages.generated.d.ts +1 -1
- package/data/r-base-packages.generated.js +3 -3
- package/data/sigdb/sigdb.remote.json +53 -53
- package/dataflow/environments/built-in-proc-name.d.ts +2 -0
- package/dataflow/environments/built-in-proc-name.js +2 -0
- package/dataflow/environments/built-in.d.ts +2 -0
- package/dataflow/environments/built-in.js +2 -0
- package/dataflow/environments/default-builtin-config.d.ts +3 -5
- package/dataflow/environments/default-builtin-config.js +2 -2
- package/dataflow/environments/environment.d.ts +9 -0
- package/dataflow/environments/environment.js +28 -7
- package/dataflow/environments/identifier.d.ts +1 -2
- package/dataflow/environments/identifier.js +1 -5
- package/dataflow/extractor.js +1 -2
- package/dataflow/graph/dataflowgraph-builder.js +42 -3
- package/dataflow/graph/df-helper.d.ts +15 -0
- package/dataflow/graph/df-helper.js +20 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +13 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +57 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +12 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +233 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +5 -3
- package/documentation/data/faq/faqs.js +12 -1
- package/documentation/doc-readme.js +1 -1
- package/documentation/doc-util/doc-files.d.ts +2 -2
- package/documentation/doc-util/doc-files.js +4 -7
- package/documentation/doc-util/doc-query.d.ts +12 -9
- package/documentation/doc-util/doc-query.js +63 -28
- package/documentation/wiki-absint.js +1 -4
- package/documentation/wiki-analyzer.js +8 -3
- package/documentation/wiki-cfg.js +3 -2
- package/documentation/wiki-dataflow-graph.js +14 -4
- package/documentation/wiki-interface.js +30 -16
- package/documentation/wiki-mk/doc-maker.js +1 -1
- package/documentation/wiki-query.js +190 -30
- package/documentation/wiki-signature-database.d.ts +1 -1
- package/documentation/wiki-signature-database.js +53 -27
- package/linter/linter-output.d.ts +24 -0
- package/linter/linter-output.js +117 -0
- package/linter/linter-rules.d.ts +2 -4
- package/linter/rules/dataframe-access-validation.js +4 -4
- package/linter/rules/deprecated-functions.d.ts +2 -4
- package/linter/rules/deprecated-functions.js +58 -3
- package/linter/rules/undefined-symbol.js +18 -10
- package/linter/rules/unused-definition.js +24 -0
- package/package.json +5 -2
- package/project/context/flowr-analyzer-context.d.ts +61 -1
- package/project/context/flowr-analyzer-context.js +124 -3
- package/project/context/flowr-analyzer-dependencies-context.d.ts +32 -7
- package/project/context/flowr-analyzer-dependencies-context.js +33 -3
- package/project/context/flowr-analyzer-files-context.d.ts +40 -0
- package/project/context/flowr-analyzer-files-context.js +171 -14
- package/project/context/flowr-analyzer-loading-order-context.d.ts +6 -0
- package/project/context/flowr-analyzer-loading-order-context.js +20 -0
- package/project/context/flowr-analyzer-meta-context.d.ts +92 -10
- package/project/context/flowr-analyzer-meta-context.js +64 -23
- package/project/context/flowr-file.d.ts +7 -0
- package/project/context/flowr-file.js +7 -0
- package/project/context/project-kind.d.ts +22 -0
- package/project/context/project-kind.js +27 -0
- package/project/dependency-version-space.d.ts +168 -0
- package/project/dependency-version-space.js +570 -0
- package/project/flowr-analyzer-builder.js +1 -1
- package/project/flowr-analyzer.d.ts +7 -0
- package/project/flowr-analyzer.js +9 -0
- package/project/plugins/file-plugins/files/flowr-description-file.d.ts +4 -0
- package/project/plugins/file-plugins/files/flowr-description-file.js +7 -0
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +5 -1
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +739 -0
- package/project/plugins/file-plugins/files/flowr-rda-file.js +2407 -0
- package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +31 -0
- package/project/plugins/file-plugins/files/flowr-rproject-file.js +66 -0
- package/project/plugins/file-plugins/files/r-fun-tab.d.ts +828 -0
- package/project/plugins/file-plugins/files/r-fun-tab.js +1039 -0
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +26 -0
- package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +38 -0
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +17 -0
- package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +30 -0
- package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +22 -0
- package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +36 -0
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +3 -4
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +5 -6
- package/project/plugins/flowr-analyzer-plugin.js +5 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.d.ts +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.d.ts +14 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-implicit-sources-plugin.js +53 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-plugin.js +1 -1
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.d.ts +15 -0
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-rprofile-plugin.js +33 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +18 -13
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +13 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +32 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +8 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +70 -7
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.d.ts +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.d.ts +18 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +62 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +5 -13
- package/project/plugins/package-version-plugins/package.d.ts +4 -1
- package/project/plugins/package-version-plugins/package.js +8 -5
- package/project/plugins/plugin-registry.d.ts +11 -3
- package/project/plugins/plugin-registry.js +24 -5
- package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.d.ts +51 -0
- package/project/plugins/project-discovery/flowr-analyzer-ignore-file-project-discovery-plugin.js +101 -0
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +10 -5
- package/project/sigdb/build.js +12 -2
- package/project/sigdb/decode.d.ts +7 -0
- package/project/sigdb/decode.js +35 -4
- package/project/sigdb/decompress.d.ts +2 -0
- package/project/sigdb/decompress.js +5 -0
- package/project/sigdb/manifest.d.ts +5 -0
- package/project/sigdb/manifest.js +37 -6
- package/project/sigdb/reader.d.ts +82 -2
- package/project/sigdb/reader.js +226 -14
- package/project/sigdb/schema.d.ts +31 -5
- package/project/sigdb/schema.js +7 -3
- package/project/sigdb/{version.d.ts → sigdb-version.d.ts} +21 -1
- package/project/sigdb/sigdb-version.js +119 -0
- package/queries/catalog/absint-query/absint-query-format.d.ts +2 -0
- package/queries/catalog/absint-query/absint-query-format.js +2 -0
- package/queries/catalog/call-context-query/call-context-query-executor.js +30 -3
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -0
- package/queries/catalog/call-context-query/call-context-query-format.js +1 -0
- package/queries/catalog/call-graph-query/call-graph-query-executor.js +3 -1
- package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +6 -0
- package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -0
- package/queries/catalog/call-graph-query/expand-library-internals.d.ts +19 -0
- package/queries/catalog/call-graph-query/expand-library-internals.js +59 -0
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -0
- package/queries/catalog/cluster-query/cluster-query-format.js +1 -0
- package/queries/catalog/config-query/config-query-executor.js +17 -5
- package/queries/catalog/config-query/config-query-format.d.ts +19 -3
- package/queries/catalog/config-query/config-query-format.js +258 -98
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -0
- package/queries/catalog/control-flow-query/control-flow-query-format.js +1 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +1 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.js +1 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -7
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +13 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +117 -17
- package/queries/catalog/dice-query/dice-query-executor.js +6 -9
- package/queries/catalog/dice-query/dice-query-format.d.ts +4 -5
- package/queries/catalog/dice-query/dice-query-format.js +10 -6
- package/queries/catalog/does-call-query/does-call-query-executor.js +15 -2
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +8 -0
- package/queries/catalog/does-call-query/does-call-query-format.js +4 -1
- package/queries/catalog/files-query/files-query-format.d.ts +2 -0
- package/queries/catalog/files-query/files-query-format.js +2 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +6 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +293 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +121 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +345 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -0
- package/queries/catalog/id-map-query/id-map-query-format.js +1 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -0
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -0
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -0
- package/queries/catalog/linter-query/linter-query-executor.js +11 -2
- package/queries/catalog/linter-query/linter-query-format.d.ts +9 -4
- package/queries/catalog/linter-query/linter-query-format.js +44 -21
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
- package/queries/catalog/location-map-query/location-map-query-format.js +2 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +1 -0
- package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
- package/queries/catalog/origin-query/origin-query-format.js +2 -0
- package/queries/catalog/project-query/project-query-executor.d.ts +0 -15
- package/queries/catalog/project-query/project-query-executor.js +19 -62
- package/queries/catalog/project-query/project-query-format.d.ts +7 -18
- package/queries/catalog/project-query/project-query-format.js +3 -18
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
- package/queries/catalog/provenance-query/provenance-query-format.js +2 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +2 -0
- package/queries/catalog/search-query/search-query-format.d.ts +1 -0
- package/queries/catalog/search-query/search-query-format.js +1 -0
- package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -0
- package/queries/catalog/signature-query/signature-query-executor.js +267 -57
- package/queries/catalog/signature-query/signature-query-format.d.ts +37 -6
- package/queries/catalog/signature-query/signature-query-format.js +41 -5
- package/queries/catalog/signature-query/signature-query-render.js +48 -6
- package/queries/catalog/slice-query-options.d.ts +49 -0
- package/queries/catalog/slice-query-options.js +50 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -12
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -15
- package/queries/catalog/static-slice-query/static-slice-query-format.js +9 -10
- package/queries/query-print.js +3 -1
- package/queries/query.d.ts +62 -2
- package/queries/query.js +9 -2
- package/r-bridge/data/data.d.ts +16 -0
- package/r-bridge/data/data.js +20 -0
- package/r-bridge/lang-4.x/ast/model/model.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +19 -16
- package/reconstruct/reconstruct.d.ts +18 -1
- package/reconstruct/reconstruct.js +42 -19
- package/slicing/criterion/parse.d.ts +4 -0
- package/slicing/criterion/parse.js +4 -0
- package/slicing/static/slice-call.js +17 -9
- package/slicing/static/static-slicer.d.ts +1 -1
- package/slicing/static/static-slicer.js +5 -4
- package/util/files.d.ts +19 -1
- package/util/files.js +45 -3
- package/util/glob.d.ts +19 -0
- package/util/glob.js +67 -0
- package/util/log.d.ts +12 -0
- package/util/log.js +17 -1
- package/util/logic.d.ts +6 -0
- package/util/logic.js +31 -1
- package/util/mermaid/dfg.js +17 -12
- package/util/mermaid/mermaid.js +2 -2
- package/util/objects.d.ts +5 -0
- package/util/objects.js +8 -0
- package/util/r-version.d.ts +9 -1
- package/util/r-version.js +27 -2
- package/util/schema.d.ts +18 -0
- package/util/schema.js +102 -4
- package/util/text/ansi.d.ts +4 -0
- package/util/text/ansi.js +27 -3
- package/util/text/strings.d.ts +9 -0
- package/util/text/strings.js +29 -0
- package/util/version.js +79 -6
- package/abstract-interpretation/domains/satisfiable-domain.d.ts +0 -29
- package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +0 -22
- package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +0 -52
- package/project/sigdb/version.js +0 -55
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeGuessDepVersionsQuery = executeGuessDepVersionsQuery;
|
|
4
|
+
const guess_dep_versions_query_format_1 = require("./guess-dep-versions-query-format");
|
|
5
|
+
const r_version_1 = require("../../../util/r-version");
|
|
6
|
+
const objects_1 = require("../../../util/objects");
|
|
7
|
+
const reader_1 = require("../../../project/sigdb/reader");
|
|
8
|
+
const dependency_version_space_1 = require("../../../project/dependency-version-space");
|
|
9
|
+
/** the sources `query` disables: `clean` is sugar for disabling `declared`+`transitive`, `disabled` adds any others by name */
|
|
10
|
+
function disabledSources(query) {
|
|
11
|
+
if (!query.clean && !query.disabled?.length) {
|
|
12
|
+
return dependency_version_space_1.NoDisabledSources;
|
|
13
|
+
}
|
|
14
|
+
return new Set([...(query.clean ? ['declared', 'transitive'] : []), ...(query.disabled ?? [])]);
|
|
15
|
+
}
|
|
16
|
+
/** collects and deduplicates provenance-carrying constraints */
|
|
17
|
+
class EvidenceCollector {
|
|
18
|
+
seen = new Set();
|
|
19
|
+
list = [];
|
|
20
|
+
add = (c) => {
|
|
21
|
+
const key = `${c.source}|${c.origin}|${c.bound ?? ''}|${c.detail}`;
|
|
22
|
+
if (this.seen.has(key)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
this.seen.add(key);
|
|
26
|
+
this.list.push((0, objects_1.compactRecord)({ ...c }));
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** merge several guess-dep-versions queries into one: union the packages, keep the tightest (earliest date, smallest cap) */
|
|
30
|
+
function mergeQueries(queries) {
|
|
31
|
+
if (queries.length === 1) {
|
|
32
|
+
return queries[0];
|
|
33
|
+
}
|
|
34
|
+
const packages = new Set();
|
|
35
|
+
let anyAll = false;
|
|
36
|
+
let earliestDate, earliestTime = Infinity, anyDate;
|
|
37
|
+
let maxCandidates;
|
|
38
|
+
let maxIterations;
|
|
39
|
+
let explode;
|
|
40
|
+
const disabled = new Set();
|
|
41
|
+
let anyClean = false;
|
|
42
|
+
for (const q of queries) {
|
|
43
|
+
if (q.packages) {
|
|
44
|
+
for (const p of q.packages) {
|
|
45
|
+
packages.add(p);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
anyAll = true;
|
|
50
|
+
}
|
|
51
|
+
if (q.date) {
|
|
52
|
+
anyDate ??= q.date;
|
|
53
|
+
const parsed = (0, dependency_version_space_1.dateCutoff)(q.date);
|
|
54
|
+
if (parsed && parsed.getTime() < earliestTime) {
|
|
55
|
+
earliestTime = parsed.getTime();
|
|
56
|
+
earliestDate = q.date;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (q.maxCandidates !== undefined) {
|
|
60
|
+
maxCandidates = maxCandidates === undefined ? q.maxCandidates : Math.min(maxCandidates, q.maxCandidates);
|
|
61
|
+
}
|
|
62
|
+
if (q.maxIterations !== undefined) {
|
|
63
|
+
maxIterations = maxIterations === undefined ? q.maxIterations : Math.max(maxIterations, q.maxIterations);
|
|
64
|
+
}
|
|
65
|
+
explode ??= q.explode;
|
|
66
|
+
anyClean ||= q.clean === true;
|
|
67
|
+
for (const s of q.disabled ?? []) {
|
|
68
|
+
disabled.add(s);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// keep the tightest date, or any malformed date to report it
|
|
72
|
+
const date = earliestDate ?? anyDate;
|
|
73
|
+
return {
|
|
74
|
+
type: 'guess-dep-versions',
|
|
75
|
+
...(anyAll || packages.size === 0 ? {} : { packages: [...packages] }),
|
|
76
|
+
...(date ? { date } : {}),
|
|
77
|
+
...(maxCandidates !== undefined ? { maxCandidates } : {}),
|
|
78
|
+
...(maxIterations !== undefined ? { maxIterations } : {}),
|
|
79
|
+
...(explode ? { explode } : {}),
|
|
80
|
+
...(anyClean ? { clean: true } : {}),
|
|
81
|
+
...(disabled.size > 0 ? { disabled: [...disabled] } : {})
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/** format version range string from survivors and declared constraints, honest about gaps */
|
|
85
|
+
function rangeString(survivors, nonContiguous, unsatisfiable, declaredRange, declaredConstraints, cap) {
|
|
86
|
+
if (survivors.length === 0) {
|
|
87
|
+
if (unsatisfiable) {
|
|
88
|
+
return declaredConstraints.join(' ') || '<contradiction>';
|
|
89
|
+
}
|
|
90
|
+
return declaredRange ? declaredRange.raw : '*';
|
|
91
|
+
}
|
|
92
|
+
if (survivors.length === 1) {
|
|
93
|
+
return survivors[0];
|
|
94
|
+
}
|
|
95
|
+
const min = survivors[0], max = survivors[survivors.length - 1];
|
|
96
|
+
if (!nonContiguous) {
|
|
97
|
+
return `>=${min} <=${max}`;
|
|
98
|
+
}
|
|
99
|
+
// a version between min and max was rejected, so `>=min <=max` would falsely imply it is acceptable: be explicit
|
|
100
|
+
return survivors.length <= cap ? survivors.join(', ') : `${min}...${max} (${survivors.length} discrete)`;
|
|
101
|
+
}
|
|
102
|
+
/** build the reported guess for one package from its already-computed surviving versions and provenance */
|
|
103
|
+
function guessPackage(name, cap, surviving, evidence, used, linkedWith) {
|
|
104
|
+
const { declaredRange, declaredConstraints, unsatisfiable } = surviving;
|
|
105
|
+
const survivors = surviving.survivors.map(e => e.ver);
|
|
106
|
+
const preSignature = surviving.preSignature.map(e => e.ver);
|
|
107
|
+
// non-contiguous: the signature pass rejected a version that lies between the surviving min and max
|
|
108
|
+
const nonContiguous = survivors.length > 1 && preSignature.some(v => r_version_1.RVersion.compare(v, survivors[0]) > 0 && r_version_1.RVersion.compare(v, survivors[survivors.length - 1]) < 0 && !survivors.includes(v));
|
|
109
|
+
const candidates = survivors.slice(0, cap);
|
|
110
|
+
return (0, objects_1.compactRecord)({
|
|
111
|
+
package: name,
|
|
112
|
+
base: surviving.base,
|
|
113
|
+
declaredConstraints,
|
|
114
|
+
range: rangeString(survivors, nonContiguous, unsatisfiable, declaredRange, declaredConstraints, cap),
|
|
115
|
+
minVersion: survivors.length > 0 ? survivors[0] : undefined,
|
|
116
|
+
maxVersion: survivors.length > 0 ? survivors[survivors.length - 1] : undefined,
|
|
117
|
+
candidateCount: survivors.length,
|
|
118
|
+
totalVersions: surviving.total,
|
|
119
|
+
candidates: candidates.length > 0 ? candidates : undefined,
|
|
120
|
+
truncated: survivors.length > cap ? true : undefined,
|
|
121
|
+
evidence: evidence.list,
|
|
122
|
+
unsatisfiable: unsatisfiable ? true : undefined,
|
|
123
|
+
linkedWith: linkedWith && linkedWith.length > 0 ? linkedWith : undefined,
|
|
124
|
+
used
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Executes a guess-dep-versions query.
|
|
129
|
+
*/
|
|
130
|
+
async function executeGuessDepVersionsQuery({ analyzer }, queries) {
|
|
131
|
+
const start = Date.now();
|
|
132
|
+
const query = mergeQueries(queries);
|
|
133
|
+
const ctx = analyzer.inspectContext();
|
|
134
|
+
const deps = ctx.deps;
|
|
135
|
+
const sources = deps.signatureSources();
|
|
136
|
+
if (sources.length === 0) {
|
|
137
|
+
return {
|
|
138
|
+
'.meta': { timing: Date.now() - start },
|
|
139
|
+
dependencies: [],
|
|
140
|
+
message: 'No signature database is loaded; version guessing needs the signature database (see the Signature Database wiki).'
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
let message;
|
|
144
|
+
let cutoff;
|
|
145
|
+
if (query.date) {
|
|
146
|
+
cutoff = (0, dependency_version_space_1.dateCutoff)(query.date);
|
|
147
|
+
if (!cutoff) {
|
|
148
|
+
message = `could not parse date '${query.date}', expected YYYY.MM.DD; ignoring the date bound`;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// bound base packages by R only when the version is genuinely known; in `auto` mode with nothing detected, base tries every R release
|
|
152
|
+
const rVersion = ctx.rVersionKnown ? (ctx.meta.getRVersion() ?? ctx.resolvedRVersion) : undefined;
|
|
153
|
+
const usage = (0, dependency_version_space_1.collectUsage)((await analyzer.dataflow()).graph, deps);
|
|
154
|
+
// the analyzed package guesses versions for its dependencies, not for itself
|
|
155
|
+
const self = ctx.meta.getNamespace();
|
|
156
|
+
const sorted = (query.packages && query.packages.length > 0 ? [...query.packages] : (0, dependency_version_space_1.defaultTargets)(deps, usage)).filter(name => name !== self).sort();
|
|
157
|
+
// resolve (and cache) each target's timeline package key + merged source once, reused across both guess passes
|
|
158
|
+
const sourceByName = new Map();
|
|
159
|
+
const sourceFor = (name) => {
|
|
160
|
+
let entry = sourceByName.get(name);
|
|
161
|
+
if (entry === undefined) {
|
|
162
|
+
const key = (0, dependency_version_space_1.timelinePackageKey)(name, sources);
|
|
163
|
+
entry = { key, src: (0, reader_1.sourceForPackage)(sources, key) };
|
|
164
|
+
sourceByName.set(name, entry);
|
|
165
|
+
}
|
|
166
|
+
return entry;
|
|
167
|
+
};
|
|
168
|
+
const disabled = disabledSources(query);
|
|
169
|
+
// the guessed lower bound of every target under a set of transitive constraints (drives the mutual-constraint refinement)
|
|
170
|
+
const guessLowerBounds = (trans) => {
|
|
171
|
+
const out = new Map();
|
|
172
|
+
for (const name of sorted) {
|
|
173
|
+
const { key, src } = sourceFor(name);
|
|
174
|
+
const s = (0, dependency_version_space_1.survivingEntries)(name, src, deps, usage.get(name), trans.get(name) ?? [], cutoff, rVersion, undefined, disabled, key);
|
|
175
|
+
if (s.survivors.length > 0) {
|
|
176
|
+
out.set(name, s.survivors[0].ver);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return out;
|
|
180
|
+
};
|
|
181
|
+
const maxIterations = query.maxIterations ?? dependency_version_space_1.DefaultFixpointIterations;
|
|
182
|
+
let transitive = (0, dependency_version_space_1.collectTransitiveConstraints)(deps, sources);
|
|
183
|
+
if (!disabled.has('transitive')) {
|
|
184
|
+
let prev = '';
|
|
185
|
+
(0, dependency_version_space_1.iterateToFixpoint)(maxIterations, () => {
|
|
186
|
+
const pass = guessLowerBounds(transitive);
|
|
187
|
+
const signature = Array.from(pass, ([k, v]) => `${k}=${v}`).sort().join(',');
|
|
188
|
+
if (signature === prev) {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
prev = signature;
|
|
192
|
+
transitive = (0, dependency_version_space_1.collectTransitiveConstraints)(deps, sources, name => pass.get(name));
|
|
193
|
+
return true;
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
const cap = query.maxCandidates ?? guess_dep_versions_query_format_1.DefaultCandidateCap;
|
|
197
|
+
const explodeOrder = query.explode?.order ?? 'newest';
|
|
198
|
+
const guessedAll = sorted.map(name => {
|
|
199
|
+
const { key, src } = sourceFor(name);
|
|
200
|
+
const evidence = new EvidenceCollector();
|
|
201
|
+
const surviving = (0, dependency_version_space_1.survivingEntries)(name, src, deps, usage.get(name), transitive.get(name) ?? [], cutoff, rVersion, evidence.add, disabled, key);
|
|
202
|
+
return { name, src, key, evidence, surviving };
|
|
203
|
+
});
|
|
204
|
+
const arcEntries = guessedAll.map(g => ({ name: g.name, src: g.src, key: g.key, survivors: g.surviving.survivors }));
|
|
205
|
+
const blockers = query.clean || disabled.has('indirect') ? new Map() : (0, dependency_version_space_1.enforceArcConsistency)(arcEntries, maxIterations);
|
|
206
|
+
guessedAll.forEach((g, i) => {
|
|
207
|
+
g.surviving = { ...g.surviving, survivors: arcEntries[i].survivors };
|
|
208
|
+
const max = g.surviving.survivors.at(-1)?.ver;
|
|
209
|
+
for (const [partner, constraint] of blockers.get(g.name) ?? []) {
|
|
210
|
+
if (max !== undefined) {
|
|
211
|
+
g.evidence.add({ source: 'indirect', origin: `${partner} ${constraint}`, detail: `${g.name} capped by ${partner}`, bound: `<=${max}` });
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
// linked packages share one version: base/R group and configured groups; intersect survivor sets to keep them consistent
|
|
216
|
+
const groups = [
|
|
217
|
+
guessedAll.filter(g => g.surviving.base).map(g => g.name),
|
|
218
|
+
...(ctx.config.solver.versionManagement?.linkedVersionGroups ?? [])
|
|
219
|
+
];
|
|
220
|
+
const linkedGroups = [];
|
|
221
|
+
const linkedWith = new Map();
|
|
222
|
+
for (const group of groups) {
|
|
223
|
+
const members = guessedAll.filter(g => group.includes(g.name));
|
|
224
|
+
if (members.length > 1) {
|
|
225
|
+
const shared = (0, dependency_version_space_1.intersectSurvivors)(members.map(m => m.surviving.survivors));
|
|
226
|
+
for (const m of members) {
|
|
227
|
+
m.surviving = { ...m.surviving, survivors: shared };
|
|
228
|
+
}
|
|
229
|
+
linkedGroups.push(members.map(m => m.name));
|
|
230
|
+
for (const m of members) {
|
|
231
|
+
linkedWith.set(m.name, members.filter(o => o !== m).map(o => o.name));
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
// runnable combinations: the base/R group is the shared hub every other constrained package is counted against
|
|
236
|
+
const grouped = new Set(linkedGroups.flat());
|
|
237
|
+
const factorOf = (g) => ({ name: g.name, src: g.src, key: g.key, survivors: g.surviving.survivors.map(e => e.ver) });
|
|
238
|
+
let hub, hubTotal = 1, othersTotal = 1;
|
|
239
|
+
const others = [];
|
|
240
|
+
for (const group of linkedGroups) {
|
|
241
|
+
const rep = guessedAll.find(g => group.includes(g.name));
|
|
242
|
+
if (rep === undefined) {
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
if (rep.surviving.base && hub === undefined) {
|
|
246
|
+
hub = factorOf(rep);
|
|
247
|
+
hubTotal = rep.surviving.total ?? 1;
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
others.push(factorOf(rep));
|
|
251
|
+
othersTotal *= rep.surviving.total ?? 1;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
// a package is a counted factor only when a *real* constraint narrows it (declared/transitive/signature/indirect);
|
|
255
|
+
// date/available narrowing alone must not promote an otherwise any-version package into the product, or a tighter
|
|
256
|
+
// date cutoff could paradoxically grow the count by turning more packages into factors
|
|
257
|
+
const reallyConstrained = (g) => g.evidence.list.some(e => e.source === 'declared' || e.source === 'transitive' || e.source === 'signature' || e.source === 'indirect');
|
|
258
|
+
for (const g of guessedAll) {
|
|
259
|
+
const total = g.surviving.total ?? 0;
|
|
260
|
+
if (grouped.has(g.name) || total === 0 || !reallyConstrained(g)) {
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
others.push(factorOf(g));
|
|
264
|
+
othersTotal *= total;
|
|
265
|
+
}
|
|
266
|
+
const runnableCombinations = (0, dependency_version_space_1.countRunnableCombinations)(hub, others);
|
|
267
|
+
const possibleCombinations = hubTotal * othersTotal;
|
|
268
|
+
const dependencies = [];
|
|
269
|
+
const ordered = [];
|
|
270
|
+
for (const g of guessedAll) {
|
|
271
|
+
dependencies.push(guessPackage(g.name, cap, g.surviving, g.evidence, usage.has(g.name), linkedWith.get(g.name)));
|
|
272
|
+
const oc = query.explode ? (0, dependency_version_space_1.orderedCandidatesOf)(g.src, g.name, g.surviving, query.explode.prefer?.[g.name], explodeOrder) : undefined;
|
|
273
|
+
if (oc) {
|
|
274
|
+
ordered.push(oc);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
const assignments = query.explode
|
|
278
|
+
? [...(0, dependency_version_space_1.assignmentsOf)(ordered, query.explode.limit ?? dependency_version_space_1.DefaultExplodeLimit)].map(a => ({ versions: Object.fromEntries(a.versions) }))
|
|
279
|
+
: undefined;
|
|
280
|
+
return (0, objects_1.compactRecord)({
|
|
281
|
+
'.meta': { timing: Date.now() - start },
|
|
282
|
+
dependencies,
|
|
283
|
+
dateCutoff: cutoff ? (0, dependency_version_space_1.isoDay)(cutoff) : undefined,
|
|
284
|
+
rVersion,
|
|
285
|
+
versionSelection: ctx.config.solver.sigdb.versionSelection,
|
|
286
|
+
runnableCombinations,
|
|
287
|
+
possibleCombinations,
|
|
288
|
+
linkedGroups: linkedGroups.length > 0 ? linkedGroups : undefined,
|
|
289
|
+
assignments,
|
|
290
|
+
message
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
//# sourceMappingURL=guess-dep-versions-query-executor.js.map
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
|
|
2
|
+
import Joi from 'joi';
|
|
3
|
+
import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
4
|
+
import type { ParsedQueryLine } from '../../query';
|
|
5
|
+
import { type VersionString } from '../../../util/r-version';
|
|
6
|
+
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
7
|
+
import { VersionSelection, type FlowrConfig } from '../../../config';
|
|
8
|
+
import { executeGuessDepVersionsQuery } from './guess-dep-versions-query-executor';
|
|
9
|
+
import type { ConstraintSource, DerivedConstraint } from '../../../project/dependency-version-space';
|
|
10
|
+
/**
|
|
11
|
+
* Guesses the possible version range of every dependency of a project by combining what the project *declares*
|
|
12
|
+
* (a `DESCRIPTION` range, an `rproject.toml` entry, a lockfile pin, and their transitive constraints) with what
|
|
13
|
+
* the code actually *does* (which package functions it calls and with which arguments, matched against the
|
|
14
|
+
* {@link https://github.com/flowr-analysis/flowr/wiki/Signature-Database|signature database}). A named argument
|
|
15
|
+
* a function only gained in some version raises the lower bound ("this parameter only existed from version X.Y,
|
|
16
|
+
* so it must be at least X.Y"); an optional `date` caps every guess to releases available at that point in time,
|
|
17
|
+
* and base-R packages are additionally bounded by the assumed/declared R version.
|
|
18
|
+
*/
|
|
19
|
+
export interface GuessDepVersionsQuery extends BaseQueryFormat {
|
|
20
|
+
readonly type: 'guess-dep-versions';
|
|
21
|
+
/** restrict the guess to these packages; omit to guess for every declared and used dependency */
|
|
22
|
+
readonly packages?: readonly string[];
|
|
23
|
+
/** only consider versions released on or before this day, written `YYYY.MM.DD` (also `YYYY` or `YYYY.MM`) */
|
|
24
|
+
readonly date?: string;
|
|
25
|
+
/** cap the number of candidate versions listed per dependency in the result (default {@link DefaultCandidateCap}) */
|
|
26
|
+
readonly maxCandidates?: number;
|
|
27
|
+
/** bound both fixpoint loops (mutual transitive refinement and arc consistency), default {@link DefaultFixpointIterations} */
|
|
28
|
+
readonly maxIterations?: number;
|
|
29
|
+
/** ignore the project's declared constraints (`DESCRIPTION` ranges, lockfile pins, transitive requirements); guess purely from code usage and the date/R bounds */
|
|
30
|
+
readonly clean?: boolean;
|
|
31
|
+
/** exclude these evidence sources from consideration entirely (repl: `--disabled` followed by their one-letter codes, e.g. `--disabled ds` for declared+signature) */
|
|
32
|
+
readonly disabled?: readonly ConstraintSource[];
|
|
33
|
+
/** also explode the guessed space into concrete per-dependency version assignments (see {@link GuessExplodeOptions}) */
|
|
34
|
+
readonly explode?: GuessExplodeOptions;
|
|
35
|
+
}
|
|
36
|
+
/** how to explode the guessed constraint space into concrete version assignments */
|
|
37
|
+
export interface GuessExplodeOptions {
|
|
38
|
+
/** iterate each dependency's versions newest-first (default) or oldest-first */
|
|
39
|
+
readonly order?: 'newest' | 'oldest';
|
|
40
|
+
/** a version to prefer per dependency when it survives the constraints (package name to version) */
|
|
41
|
+
readonly prefer?: Readonly<Record<string, VersionString>>;
|
|
42
|
+
/** cap the number of assignments produced */
|
|
43
|
+
readonly limit?: number;
|
|
44
|
+
}
|
|
45
|
+
/** one concrete version choice per resolvable dependency (`package -> version`) */
|
|
46
|
+
export interface VersionAssignmentView {
|
|
47
|
+
readonly versions: Readonly<Record<string, VersionString>>;
|
|
48
|
+
}
|
|
49
|
+
/** the default cap on how many surviving candidate versions are listed per dependency */
|
|
50
|
+
export declare const DefaultCandidateCap = 16;
|
|
51
|
+
/** where a single bound on a dependency's version came from (the {@link DerivedConstraint} source, from the resolver) */
|
|
52
|
+
export type GuessEvidenceSource = ConstraintSource;
|
|
53
|
+
/**
|
|
54
|
+
* One provenance-carrying constraint on a dependency's version: where it comes from (`source`/`origin`) and what
|
|
55
|
+
* it requires (`bound`). The set of these on a {@link GuessedDependency} is exactly why the range is what it is, so
|
|
56
|
+
* it can answer "it must be `>= 4.2.0` because ...". This is the resolver's {@link DerivedConstraint}.
|
|
57
|
+
*/
|
|
58
|
+
export type GuessVersionEvidence = DerivedConstraint;
|
|
59
|
+
/** the guessed version range of one dependency */
|
|
60
|
+
export interface GuessedDependency {
|
|
61
|
+
readonly package: string;
|
|
62
|
+
/** whether this is an R-core / base package (then its version *is* the R version) */
|
|
63
|
+
readonly base: boolean;
|
|
64
|
+
/** the raw version constraints declared for the package (`>= 1.0.0`, a lockfile pin, ...) */
|
|
65
|
+
readonly declaredConstraints: readonly string[];
|
|
66
|
+
/** the resulting range, e.g. `>=1.0.0 <=1.1.4`, an exact `1.1.4`, or `*` when nothing constrains it */
|
|
67
|
+
readonly range: string;
|
|
68
|
+
readonly minVersion?: VersionString;
|
|
69
|
+
readonly maxVersion?: VersionString;
|
|
70
|
+
/** how many candidate versions survived every constraint */
|
|
71
|
+
readonly candidateCount: number;
|
|
72
|
+
/** how many versions the database carries in total for the package (the history the candidates are drawn from) */
|
|
73
|
+
readonly totalVersions?: number;
|
|
74
|
+
/** the surviving candidate versions, ascending (capped, see {@link GuessDepVersionsQuery.maxCandidates}) */
|
|
75
|
+
readonly candidates?: readonly VersionString[];
|
|
76
|
+
/** whether the listed {@link candidates} were capped */
|
|
77
|
+
readonly truncated?: boolean;
|
|
78
|
+
readonly evidence: readonly GuessVersionEvidence[];
|
|
79
|
+
/** set when the constraints contradict each other so that no version can satisfy them all */
|
|
80
|
+
readonly unsatisfiable?: boolean;
|
|
81
|
+
/** the other packages this one shares a version with, so its range is not independent of theirs */
|
|
82
|
+
readonly linkedWith?: readonly string[];
|
|
83
|
+
/**
|
|
84
|
+
* Whether the analyzed code actually uses this package (a declared-but-never-used dependency is unconstrained):
|
|
85
|
+
* either a direct call, or the project's own NAMESPACE registering an S3 method for a class this package OWNS
|
|
86
|
+
* (see `PackageSignatureSource.classOwner`), e.g. tseries's `S3method("as.irts","zoo")` marks `zoo` used with
|
|
87
|
+
* no direct `zoo::`/`library(zoo)` call.
|
|
88
|
+
*/
|
|
89
|
+
readonly used?: boolean;
|
|
90
|
+
}
|
|
91
|
+
export interface GuessDepVersionsQueryResult extends BaseQueryResult {
|
|
92
|
+
readonly dependencies: readonly GuessedDependency[];
|
|
93
|
+
/** the effective date cutoff that was applied (ISO `YYYY-MM-DD`), if any */
|
|
94
|
+
readonly dateCutoff?: string;
|
|
95
|
+
/** the R version the guess assumed when bounding base-R packages, if known */
|
|
96
|
+
readonly rVersion?: string;
|
|
97
|
+
/** the configured version-selection policy the sample illustrates (newest by default; see `solver.sigdb.versionSelection`) */
|
|
98
|
+
readonly versionSelection?: VersionSelection;
|
|
99
|
+
/** version tuples that satisfy every interdependency (the base/R hub counted against each dependency) */
|
|
100
|
+
readonly runnableCombinations?: number;
|
|
101
|
+
/** the whole version space those tuples are drawn from (product of each counted factor's total versions) */
|
|
102
|
+
readonly possibleCombinations?: number;
|
|
103
|
+
/** groups of packages interlinked to one shared version (the base/R group plus any configured groups), so their versions are not independent */
|
|
104
|
+
readonly linkedGroups?: readonly (readonly string[])[];
|
|
105
|
+
/** concrete version assignments, present when {@link GuessDepVersionsQuery.explode} was requested (most-preferred first) */
|
|
106
|
+
readonly assignments?: readonly VersionAssignmentView[];
|
|
107
|
+
/** a note, e.g. when the signature database is unavailable */
|
|
108
|
+
readonly message?: string;
|
|
109
|
+
}
|
|
110
|
+
/** parse a repl line: `[(clean[:<=YYYY])] [pkg ...] [--date YYYY.MM.DD] [--max N] [--iterations N] [--disabled <letters>] [--explode [--oldest] [--limit N] [--prefer pkg=ver ...]]` */
|
|
111
|
+
declare function guessDepVersionsLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'guess-dep-versions'>;
|
|
112
|
+
export declare const GuessDepVersionsQueryDefinition: {
|
|
113
|
+
readonly title: "Guess Dependency Versions Query";
|
|
114
|
+
readonly executor: typeof executeGuessDepVersionsQuery;
|
|
115
|
+
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[], _query: readonly import("../../query").Query[]) => true;
|
|
116
|
+
readonly fromLine: typeof guessDepVersionsLineParser;
|
|
117
|
+
readonly syntax: "@guess-dep-versions [<pkg> ...] [(clean | <=YYYY.MM.DD)] [--date YYYY.MM.DD] [--max <n>] [--iterations <n>] [--disabled <letters>] [--explode [--oldest] [--limit <n>] [--prefer <pkg>=<ver>]] <code | file://path>";
|
|
118
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
119
|
+
readonly flattenInvolvedNodes: () => NodeId[];
|
|
120
|
+
};
|
|
121
|
+
export {};
|