Commit Graph

301 Commits

Author SHA1 Message Date
Grigorii Kirgizov 3a15d40625 Update Supervisor and TypesIndex to incorporate changes in feedback reporting (MPSCR-32)
TypesIndex now invalidates report items from previous sessions not by node refs,
but by tags of rules which produced them. Set of invalidated tags is an addiitonal
output from incremental engine.
2020-02-05 12:29:33 +03:00
Grigorii Kirgizov 1334c7c7a1 Fix missed dependencies when computing rule's uniqueTag (from nodes in macro expand) 2020-02-05 12:29:33 +03:00
Grigorii Kirgizov 046f4969e1 Remove unnecessary calls to EvaluationResult.storeView() to save some time 2020-02-05 12:29:33 +03:00
Fedor Isakov 9403087c11 Drop RepositoryProvider interface (unused). 2020-02-04 11:43:20 +01:00
Fedor Isakov 5a20630f3d Suppress errors reported by constraints on ProjectExpression.
This enables check project to succeed without breaking the build.
2020-02-03 12:11:49 +01:00
Fedor Isakov 391c9053b5 Apply migrations after switch to MPS 193. Regenerate project. 2020-02-03 11:24:22 +01:00
Fedor Isakov 97353bfd89 Ensure collected report items are always forwarded from checkRecursively query. 2020-01-24 15:03:44 +01:00
Fedor Isakov 73f8179db7 Implement watching and incremental strategies in typechecking service.
Fix errors not always being reported to checkRecursively.
2020-01-24 15:02:34 +01:00
Fedor Isakov a5171cbffd Add an option to turn watch for model changes on/off. 2020-01-23 14:45:52 +01:00
Fedor Isakov 22c09152d5 Ensure TypesIndex keeps unique node report items. 2020-01-23 12:50:19 +01:00
Fedor Isakov 28355b99f4 Document/refactor/cleanup UpdatesRecorder for better code readability. 2020-01-22 18:00:57 +01:00
Fedor Isakov 612b1aa098 Make Factory instance in TypecheckingService volatile, fix MPSCR-26. 2020-01-21 17:50:06 +01:00
Fedor Isakov fd300e3e07 Add null guard before invoking pattern match, avoid NPE. 2020-01-21 15:32:46 +01:00
Fedor Isakov 4748387e54 Ensure node/node-ptr objects in activation trace are navigatable. 2020-01-20 10:52:40 +01:00
Fedor Isakov dfd8e97ce8 Ensure rule's unique tag is printed when debugging incremental launcher. 2020-01-20 10:52:40 +01:00
Fedor Isakov 70969dfa5c Implement coerce to type using pattern (ad-hoc for now). 2020-01-15 12:57:01 +01:00
Fedor Isakov 0fbc7f6571 Ensure typechecking can't run two coderules sessions with same session data.
Avoid sharing mutable state b/w two invocations of typechecking
initiated from different threads (race condition).
2020-01-14 12:48:24 +01:00
Fedor Isakov fa7532f34f Include origin features's hash to requiredHash when building rules.
This enables to adequately reflect changes in the model when it is updated
by editor actions, such as "side transform".

Three tests was broken as the result of this fix and are disabled
http://127.0.0.1:63320/node?ref=r%3A8d22f6d9-72f0-49ec-92ee-027a87fbedd4%28jetbrains.mps.baseLanguageExt.test.incremental%40tests%29%2F3095008005741803340
2020-01-02 17:42:38 +01:00
Fedor Isakov 662d65bcbb Ensure types index is only updated once per query execution. 2020-01-02 17:20:13 +01:00
Fedor Isakov d50d3cf9f6 Fix incremental program update not triggered in some cases.
Track invalidated set of nodes and update program correspondingly.
Use node instances as keys instead of node pointers.
2020-01-02 17:20:13 +01:00
Fedor Isakov 52d05e4953 Ensure only really evaluated queries are logged. 2020-01-02 17:20:13 +01:00
Fedor Isakov 3068ee8efb Rework support for cached types index. Cache also the reported issues.
TypecheckingQueries must track the types index used for reporting
the state of cache, since the index itself is built independently
of whether or not 'checkRecursively' is invoked.
2020-01-02 17:20:13 +01:00
Fedor Isakov efd19aa45b Implement incremental generation of coderules program.
Introduce SessionData, allow to keep arbitrary data with the session.
Extend RulesListTable with support for invalidation based on rule unique tags.
Introduce UpdatesRecorder to keep track of invalidated nodes.
Extend ApplyTemplatesStep with invalidate logic for typechecking.
Simplify design, drop unnecessary fields, minor refactorings.
2020-01-02 17:20:13 +01:00
Fedor Isakov 1e9e41601a Add method to RuleEx that had been removed from the superclass. 2020-01-02 17:20:13 +01:00
Grigorii Kirgizov b672778235 Fix build, add impl in plugin code of observers methods in Logical interface 2019-12-24 02:41:46 +03:00
Grigorii Kirgizov e8cb6f9ad2 Add rule for determining correct type to bind inference variable to. Fixes MPSCR-13.
The inferred type can be either capture or type variable.
This logic is covered by a new rule 'inferFromCapture'.
For examples see 'Bounds' test sample.

This inference is used in call arguments type inference.
It happens on cases when bounds arise from several places:
 (a) bounds for inference variables from type vars declared in method signature (hasBound constraint)
 (b) bounds of type vars used as arguments to call (typeVariableType term wiht bounds inside)
 (c) bounds from captures on type variables from case (b), which come in the form of 'captureOf' term
2019-12-18 21:47:07 +03:00
Fedor Isakov 603dab6797 Refactor RuleBuilder: extract RuleImpl as standalone class. 2019-12-11 11:42:31 +01:00
Fedor Isakov f83ac4b692 Clearer contract for building rule's uniqueTag. Drop ArgumentsCollector.
ArgumentsCollector used in tests only, move it there.
2019-12-10 17:21:33 +01:00
Fedor Isakov 0af0d0152d Ensure typechecking cache is cleared on closing session. Closes MPSCR-23 2019-12-09 14:15:16 +01:00
Fedor Isakov 1f621bfda8 Refactor query-running code in typechecking provider. Show time spent in query.
Only show messages for queries that took more than 10 ms. to complete.
2019-12-02 11:33:49 +01:00
Fedor Isakov 85674ef077 Add explicit "test" facets to test solutions. 2019-11-24 17:58:15 +01:00
Fedor Isakov bfbf4840fa Fix language imports. 2019-11-11 14:49:07 +01:00
Fedor Isakov 5bce04eb71 Fix language imports. 2019-11-11 14:49:01 +01:00
Fedor Isakov 69bc34e8f9 Drop language j.m.l.smodel.types containing SNodeTypeOp that is no longer used. 2019-11-11 14:37:41 +01:00
Fedor Isakov de84b88b2c Replace instances of SNodeTypeOp with regular method invocation. 2019-11-11 14:27:57 +01:00
Fedor Isakov ecd2594fed Drop deprecated Reporting interface and all its usages.
Remove runtime solution that contained only Reporting.
2019-11-11 13:53:41 +01:00
Fedor Isakov fb8e995c88 Fix NPE in event processing, closes MPSCR-12. 2019-11-11 11:11:55 +01:00
Fedor Isakov 036f8393b5 Avoid null-ifying Config fields on dispose. Fix stupid bug in TypecheckingOptions. Fixes MPSCR-8. 2019-11-11 10:58:49 +01:00
Grigorii Kirgizov 53ddcb8492 Small cleanup of TraceTool for incremental processing 2019-11-07 17:15:56 +03:00
Grigorii Kirgizov 7b33e0e31f Minor cleanup: remove usages of DependentRulesSpec 2019-11-06 19:10:29 +03:00
Fedor Isakov 3f1b65ada2 Fix the structural errors introduced by a badly run migration. 2019-11-06 12:05:18 +01:00
Fedor Isakov ad90a4cb77 Apply migration that replaces all instances of NodeAnchor with .pointer op. 2019-11-06 11:21:57 +01:00
Fedor Isakov daa1bdceb6 Update default jvm options for running tests to "-Xmx2048m". 2019-11-05 20:53:01 +01:00
Fedor Isakov bb8fffc7ea Enable to use origin{} block to specify no origin.
Rules that are used only as auxiliary resolvers don't have an associated
origin node, even though they are produced from a specific location.
To enable tracking of correct origin to report errors to one can use
origin(no origin){} to override the default behaviour.
2019-11-05 18:46:02 +01:00
Fedor Isakov 76739d20d9 Minor refactoring and renaming in coderules runtime. Documentation.
Rename classes and methods to better reflect the intent.
Move test-related stuff to test util model.
2019-11-05 18:46:02 +01:00
Fedor Isakov 48375c4d14 Extend RuleBuilder with template app session: automatically require node ponters passed as args to constraints.
Every node pointer (SNodeReference) specified as an arg to a constraint causes the (resolved) target to be included
into template application session (required).
Reduce NodeAnchor to .pointer call.
Deprecate Reporting interface and context repository in rule definitions.
2019-11-04 16:20:57 +01:00
Fedor Isakov cc8cf72819 Minor code cleanup: get rid of MacroTemplate.ID, simplify templates. Systemize RuleBuilder usages. 2019-11-04 16:20:57 +01:00
Grigorii Kirgizov 1a720dd76e Fix RuleBuilder.uniqueTag computation: consider SNodeReference not only inside DataNode but also raw 2019-10-31 18:07:31 +03:00
Fedor Isakov 3092fa3635 Fix all templates with broken scopes for logical variables. 2019-10-25 22:45:55 +02:00
Fedor Isakov 4160c186e1 Introduce dependency to Config in typechecking options and service. Avoid relying on static getInstance() method to access Config.
Config is an application-level "component" initialized from an application plugin.
All usages on application/project-level should declare explicit dependency on it.
Tests can either create a new instance or access the shared one.
2019-10-23 15:39:17 +02:00