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

API conversion to TypeScript #41

Merged
merged 169 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 162 commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
acb74c3
Modify BaseJoinPoint Implementation to depend on the common language …
lm-sousa Jul 14, 2023
7272f45
Create a BaseJoinPoint specification generator/extractor for Lara-JS
lm-sousa Jul 14, 2023
97eda58
Renamed BaseJoinPoint to LaraJoinPoint
lm-sousa Jul 14, 2023
1d716fb
Updated specification file, refactored TS interface generator and inc…
lm-sousa Jul 17, 2023
1e63b40
Development in ts conversion
fabioc-morais Jul 4, 2023
c3c2ba9
Rename strings.lara
fabioc-morais Jul 4, 2023
6c85eca
[Lara-JS] Refactor TimeUnits.ts
lm-sousa Jul 4, 2023
27842b1
[Lara-JS] Refactor and deprecate StringSet module
lm-sousa Jul 4, 2023
5f43bc7
Fixed issue regarding static methods
fabioc-morais Jul 5, 2023
68535cd
Renamed strings.lara
fabioc-morais Jul 5, 2023
cc9fed8
Strings.ts passing tests
fabioc-morais Jul 5, 2023
28c76bf
renamed Io.lara
fabioc-morais Jul 5, 2023
5db6c81
Started Io.ts
fabioc-morais Jul 5, 2023
9a2cb7e
Passing tests except JsImportTest
fabioc-morais Jul 6, 2023
2697868
Renamed replacer.lara and moved
fabioc-morais Jul 6, 2023
2e5211c
Replacer.ts passing tests
fabioc-morais Jul 6, 2023
ce06339
csv.ts passing tests
fabioc-morais Jul 6, 2023
2b66fd8
Renamed DataStore.lara and moved it
fabioc-morais Jul 6, 2023
4a78033
Format and fix some typings
lm-sousa Jul 6, 2023
f7bf6d1
[Lara-JS] Major refactor of APIs
lm-sousa Jul 8, 2023
280b95e
Fixed Accumulator bug - WeaverData problem with imports
fabioc-morais Jul 10, 2023
14ebe15
Refactor code from latest commit
lm-sousa Jul 10, 2023
e00162d
Undo changes to Weaver.ts
lm-sousa Jul 10, 2023
291465d
Merge LaraCore and Check implementations as they are duplicates
lm-sousa Jul 10, 2023
293771b
Started testing
fabioc-morais Jul 10, 2023
71d544d
Added weaver.ts
fabioc-morais Jul 11, 2023
f7333ea
Refactor Io.ts to deprecate some of its methods
lm-sousa Jul 10, 2023
40eaa4f
Fix bug that prevented compilation
lm-sousa Jul 10, 2023
49e7c0e
Format and perform a minor refactor of DataStore.ts
lm-sousa Jul 10, 2023
9982923
Add extension recommendations and settings for uniform formatting
lm-sousa Jul 10, 2023
ddbd0fb
Merged similar functions
lm-sousa Jul 10, 2023
1d23ba8
Moved initialisation out of the constructor
lm-sousa Jul 10, 2023
86344a5
Set the correct streams based on the Javascript environment
lm-sousa Jul 10, 2023
ddb2bb8
Moved file to proper location
lm-sousa Jul 10, 2023
385e1e0
Refactor output.ts
lm-sousa Jul 10, 2023
9855f63
Minor code refactor over WeaverDataStore
lm-sousa Jul 10, 2023
3b67cbd
Clarify some aspects of the DataStore class
lm-sousa Jul 10, 2023
0ef10ed
Fix Accumulator tests
lm-sousa Jul 10, 2023
d7eeeda
Enable linter in tests
lm-sousa Jul 10, 2023
d9519e6
Major refactor of multiple APIs
lm-sousa Jul 11, 2023
5111aa0
Refactor JavaTypes
lm-sousa Jul 12, 2023
c4a3044
passing LARAI tests
fabioc-morais Jul 12, 2023
8bd8d69
Small fix in ts tests
fabioc-morais Jul 12, 2023
b6e3926
replaced deprecated function and added finished test
fabioc-morais Jul 12, 2023
9888b45
Fix bug in java class import
lm-sousa Jul 12, 2023
2beaf57
Add JavaTypes.instanceOf for Java type checking
lm-sousa Jul 12, 2023
2aa8094
Exposed JavaTypes.getType()
lm-sousa Jul 12, 2023
bb1e315
Fix namespace bug
lm-sousa Jul 13, 2023
bc023f8
Fixed TimeUnit bug
fabioc-morais Jul 13, 2023
ef5b9ba
Fixed printonce test and first version of joinpointsbase.ts
fabioc-morais Jul 13, 2023
b41c150
Added first version of selector.ts tests passing
fabioc-morais Jul 13, 2023
b16d60c
Added first version of query.ts
fabioc-morais Jul 13, 2023
c716397
Fixed import issues
fabioc-morais Jul 13, 2023
663abf6
Add method for checking if an object comes from Java
lm-sousa Jul 14, 2023
fc973bc
Bug fixing
fabioc-morais Jul 17, 2023
3555a09
removing lost console logs
fabioc-morais Jul 17, 2023
a1f7831
Refactored abstrat class JoinPointsBase and fixed check join point bug
fabioc-morais Jul 17, 2023
e3ab6e3
Fix mistakes in rebase operation
lm-sousa Jul 17, 2023
147b160
Fix Checkpoint tests
lm-sousa Jul 17, 2023
b5e4e07
Major dump of new APIs versions
lm-sousa Jul 17, 2023
7fc3616
Enable the native implementation of console.log of GraalJS
lm-sousa Jul 13, 2023
4e3fe97
Make the default stream not be null
lm-sousa Jul 13, 2023
d1221d5
Fix bug with LaraJoinPoint.ts
lm-sousa Jul 18, 2023
edfc887
Make jest detect issues with the java bridge
lm-sousa Jul 18, 2023
847b1b6
Refactor core script importer
lm-sousa Jul 18, 2023
edc5b2d
Major refactor of APIs to take advantage of the new LaraJoinPoint type
lm-sousa Jul 18, 2023
252e965
Remove unused setting
lm-sousa Jul 18, 2023
ae5bb7c
Organize imports
lm-sousa Jul 18, 2023
b4072ce
Fixed a bug with the weaver setup wouldn't be awaited
lm-sousa Jul 19, 2023
986e6c7
Extract java setup to a seperate method on the Weaver
lm-sousa Jul 19, 2023
0343d04
Generalise and deprecate a function for checking if an array had an e…
lm-sousa Jul 19, 2023
c19ed62
Removed necessity for a workaround on the JS APIs
lm-sousa Jul 19, 2023
08d223b
Setup shared java module for Jest environment
lm-sousa Jul 19, 2023
f0790c8
Remove dead code and update apis folder
lm-sousa Jul 19, 2023
b39d544
Tweak jest config to reenable coverage testing
lm-sousa Jul 19, 2023
0e2c0e3
Resolved warning in jest config
fabioc-morais Jul 20, 2023
72cd88f
Non-tested files count towards testing coverage
lm-sousa Jul 20, 2023
d2140fa
Unwrap joinpoint parameters in joinpoint methods before the java inte…
lm-sousa Jul 20, 2023
bb8646c
Refactor java-dist script to allow for parameterization
lm-sousa Jul 22, 2023
3dc92cb
Bump dependencies
lm-sousa Jul 22, 2023
90745cf
Fix bug with mapper resolution
lm-sousa Jul 23, 2023
f631fc2
Add resource namespaces to JavaResources file
lm-sousa Jul 23, 2023
77e13de
Publish java-dist script
lm-sousa Jul 23, 2023
61abab9
Move functionality from clone LaraCore file to original one and simpl…
lm-sousa Jul 23, 2023
12ecce8
Remove commented code from java codebase
lm-sousa Jul 23, 2023
3ccb372
Print import type with debug information
lm-sousa Jul 23, 2023
1fdc322
Update repository information in package.json
lm-sousa Jul 23, 2023
a2e5e87
Added Io test in jest mock in file creation required
fabioc-morais Jul 24, 2023
8d34b9a
Added documentation and types to Io.ts
fabioc-morais Jul 24, 2023
d88dc90
Fixed Io.ts types and test now removes created files
fabioc-morais Jul 24, 2023
0162c95
Correctly call joinpoint getters
lm-sousa Jul 24, 2023
79615b2
Fix bug in Java object identification
lm-sousa Jul 24, 2023
40cc02f
Make TraversalType an Enum
lm-sousa Jul 24, 2023
e635d24
Fix bug in JpFilter
lm-sousa Jul 24, 2023
e809b91
Fix Selector API
lm-sousa Jul 24, 2023
f377930
Update APIs in the java side
lm-sousa Jul 24, 2023
e636b53
Fix changes made by the rebase
lm-sousa Jul 25, 2023
ba7f64f
Allow laraGetter to resolve properties (but not methods) from the new…
lm-sousa Jul 25, 2023
68dc86f
refactor in Iotest.ts
fabioc-morais Jul 26, 2023
653b43c
Add common attributes to LaraJoinPoint
lm-sousa Jul 26, 2023
5c56054
Fix importer file mismatch
lm-sousa Jul 26, 2023
04434d9
Merge branch 'ts-conversion' of github.com:specs-feup/lara-framework …
lm-sousa Jul 26, 2023
44667e7
Refactor jp.ancestor() to jp.getAncestor()
lm-sousa Aug 1, 2023
7fc2386
Set default values for output
lm-sousa Aug 1, 2023
45436ce
Autoload LaraJoinPoint class and wrapping helpers
lm-sousa Aug 1, 2023
8157206
Add provision for repeated file names
lm-sousa Aug 1, 2023
486077a
Include default values in specification
lm-sousa Aug 1, 2023
5f91450
Fix bugs with JoinPointsBase conversion
lm-sousa Aug 1, 2023
3c2038c
Include jp.toString() in the language specification
lm-sousa Aug 1, 2023
fc6c000
Refactor jp.instanceOf() to jp.getInstanceOf()
lm-sousa Aug 1, 2023
d0d4d96
Fix bug in jp class identification
lm-sousa Aug 1, 2023
44ed071
Fix bug in method
lm-sousa Aug 1, 2023
70194fb
Make IdGenerator expose an instance
lm-sousa Aug 1, 2023
f4e3071
Replace hardcoded strings with TimeUnit enum
lm-sousa Aug 1, 2023
0663e5e
Always unwrap joinpoint method's parameters
lm-sousa Aug 1, 2023
00b0e35
Implement exceptions map for methods that do not follow the naming co…
lm-sousa Aug 1, 2023
cd28a2a
Generate setters for joinpoint classes
lm-sousa Aug 1, 2023
f594168
Implement exception for jp.node as it cannot be wrapped
lm-sousa Aug 1, 2023
74bd948
Support unwrapping of joinpoint arrays
lm-sousa Aug 1, 2023
c95b88f
Remove superfulous console.log()
lm-sousa Aug 1, 2023
9af3ace
Add wrapper exception for DataClasses
lm-sousa Aug 1, 2023
57803ee
Rebuild LaraJoinPoint interface to reflect recent changes to generator
lm-sousa Aug 1, 2023
f87b8a7
Add TODO
lm-sousa Aug 1, 2023
ebfdcf3
Minor refactor of flattenArgsArray function
lm-sousa Aug 1, 2023
b98586f
Refactor jp.descendants() to jp.getDescendants()
lm-sousa Aug 1, 2023
d9df9ce
Add wrap un unwrap code for joinpoints fetched using the old LARA asp…
lm-sousa Aug 1, 2023
ddaa0cd
Deal with Java enums on the JS side
lm-sousa Aug 1, 2023
489a421
Replace usage of deprecated WeaverJps class with calls to Query
lm-sousa Aug 1, 2023
ad83add
Remove APIs files that were forgotten in the refactoring
lm-sousa Aug 3, 2023
4ba7c4b
Allow for the use of default values on jp methods
lm-sousa Aug 3, 2023
b3d9ba6
Move CheckBaseAnalyser API to Lara-JS domain
lm-sousa Aug 3, 2023
f670c83
Move Results APIs to the Lara-JS domain
lm-sousa Aug 3, 2023
93d82a1
Moved API to clava
lm-sousa Aug 17, 2023
8d25ae1
Add base method to LaraJoinPoint
lm-sousa Aug 17, 2023
8888891
Bug fixes with Query and Selector
lm-sousa Aug 17, 2023
ff62678
Format file
lm-sousa Aug 17, 2023
a06916e
Handle default values in proxy object specification
lm-sousa Aug 17, 2023
95b5885
Log method overload conflicts
lm-sousa Aug 17, 2023
861b661
Generate proxy setters in more scenarious
lm-sousa Aug 17, 2023
91ef022
Fix type conversion bug
lm-sousa Aug 17, 2023
1d7c8a3
Support method overloads in Joinpoint specification
lm-sousa Aug 18, 2023
d0ecae7
Delete old files
lm-sousa Aug 19, 2023
170ee2c
More robust setter generation
lm-sousa Aug 19, 2023
0922fd4
Revert name of method to "instanceOf"
lm-sousa Aug 21, 2023
f5d65de
Re-enable API
lm-sousa Aug 21, 2023
5b1b201
Parameterize wrapper function names
lm-sousa Aug 21, 2023
b403965
Make usage of wrappers optional
lm-sousa Aug 21, 2023
fdf6075
Minor changes to APIs to keep the project compatible with Weavers tha…
lm-sousa Aug 21, 2023
dd9e2c7
Relax check strictness to catch null values
lm-sousa Aug 22, 2023
c41578e
Update APIs to reflect Clava joinpoint specification changes
lm-sousa Aug 22, 2023
af1ab2e
Remove exceptions to wrapper generator
lm-sousa Aug 22, 2023
ece4f44
Partially consolidate information about LaraJoinPoint
lm-sousa Aug 23, 2023
a3e17bd
Update LanguageSpecification to accept default values for attribute p…
lm-sousa Aug 23, 2023
3a97de5
Refactor wrapper generator
lm-sousa Aug 23, 2023
69a9f51
Prevent weaver warning
lm-sousa Aug 23, 2023
d46c19b
Move MathExtra API to Clava repository as it contains Clava specific …
lm-sousa Aug 24, 2023
88227e4
Move LaraBase APIs to Lara-JS domain
lm-sousa Aug 24, 2023
eaa7139
Move Platforms API to Lara-JS domain
lm-sousa Aug 24, 2023
af37950
Make API final
lm-sousa Aug 24, 2023
684a869
Delete obsolete APIs and old files
lm-sousa Aug 24, 2023
88feede
Refactor recently moved APIs
lm-sousa Aug 25, 2023
e2a415b
Joinpoint methods that handle enums now use string types
lm-sousa Aug 31, 2023
f525d62
[LanguageSpecification] Adds helper methods
joaobispo Nov 6, 2023
f1d4d16
[WeaverInterface] Refactors how LaraJoinPoint is created and accessed
joaobispo Nov 6, 2023
bdcd3c5
[WeaverInterface] Removes static import
joaobispo Nov 6, 2023
4e2df42
[LanguageSpecification] Adds helper method
joaobispo Nov 6, 2023
3690453
[WeaverInterface] Refactors Lara join point creation
joaobispo Nov 6, 2023
a1841fb
Removes field LanguageSpecificationV2 from JoinPointClass
joaobispo Nov 6, 2023
73e33e9
Replaces some uses of SpecsLogs.debug() that accepts a String with ov…
joaobispo Nov 19, 2023
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
4 changes: 2 additions & 2 deletions LARAC/src/larac/utils/xml/entity/ActionArgument.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ public void setValue(String value) {
if (type.contains("[]")) {

lit.setType(Types.Array);
} else if (value.equals("null")) {
lit.setType(Types.Null);
} else {
lit.setType(organizer.getConvertedType(type));
}
// } catch (Exception e) {
// if (value.equals("null"))
// lit.setType(Types.Null);
// else
// value.equals(Types.Object);
// }
Expand Down
31 changes: 20 additions & 11 deletions LARAC/src/org/dojo/jsl/parser/ast/ASTPerform.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,33 @@ public Object organize(Object obj) {
Action action = possibleActions.get(0);
organizeWithGivenParams(lara, act, params, newParams, action, map);
} else {
if (params.children == null) {
for (Action action : actions) {
if (action.getParameters().isEmpty()) {
final Map<String, ActionArgument> actionParam = organizer.createActionParameters(action);
act.setArguments(actionParam);
validateReturn(lara, action);
return null;
for (Action action : actions) {
int length = params.children == null ? 0 : params.children.length;
int actionParametersLength = action.getParameters().size();

int requiredParametersLength = action.getParameters().size();
for (var child : action.getParameters()) {
if (child.getDefaultValue() != null) {
requiredParametersLength--;
}
}
} else {
for (Action action : actions) {
int length = params.children.length;
if (length == action.getParameters().size()) { // Just accept same size of parameters

if (length == 0 && actionParametersLength == 0) {
final Map<String, ActionArgument> actionParam = organizer.createActionParameters(action);
act.setArguments(actionParam);
validateReturn(lara, action);
return null;
} else {
if (length >= requiredParametersLength && length <= actionParametersLength) {
final Map<String, ActionArgument> actionParam = organizer.createActionParameters(action);
int i = 0;
for (final ActionArgument arg : actionParam.values()) {
if (i >= length) {
break;
}
arg.setValue((SimpleNode) params.jjtGetChild(i++));
}


organizeWithGivenParams(lara, act, params, newParams, action, actionParam);
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ public void closeNodeScope(Node n, boolean condition) {
}
}
}
/* JavaCC - OriginalChecksum=bf137f71b6780fbbe21cef4b47f1b826 (do not edit this line) */
/* JavaCC - OriginalChecksum=0c88da2049294a28e8e441279f9d955d (do not edit this line) */
Loading
Loading