Commit Graph

180 Commits

Author SHA1 Message Date
Dima
3320cffde8
Remove service command, file options refactoring (#428) 2022-02-16 10:47:43 +03:00
Dmitry Kurinskiy
c74eb06499
427 topology bug (#433)
* fix path

* topology bug 427 test

* test with join, it works

* improve topology test, still works. add compiler test

* broken compiler test

* CompilerSpec works fine without `wrapWithXor`

* add xor to topology test, it becomes broken

* XOR topology fixed

* ForceExecModel

* Debugging topology WIP

* Fixed

Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
2022-02-15 19:20:56 +03:00
Dima
1a8af46b51
add env option to aqua cli (#434) 2022-02-15 14:15:27 +07:00
Dima
93d73fa58d
Pass name to a script as argument (#431) 2022-02-10 11:44:39 +03:00
Dima
88da133e00
Dist bug fixes (#422) 2022-02-06 08:52:51 +03:00
Dmitry Kurinskiy
6d03a0d95b
Fix for passing a stream argument with lambda to a function waiting for a scalar (#420) 2022-02-06 00:26:07 +03:00
Dima
7c711f15e4
Fix ipfs upload in aqua (#415)
* fix path

* fix ipfs

* fix pathes
2022-02-05 14:20:30 +03:00
Dima
02bf1aa25f
Fix path resolving for aqua installed package (#414)
* fix path

* fix compilation
2022-02-05 13:00:31 +03:00
Dmitry Kurinskiy
89455e20c1
Deploy service (#413)
* deploy aqua

* aqua dist deploy
2022-02-05 11:10:18 +03:00
Dima
740a9ba653
run manual (#407) 2022-02-02 14:40:10 +03:00
Dima
e4d6c14dd1
builtin as a default import in compiler (#409) 2022-02-01 09:49:19 +03:00
Dmitry Kurinskiy
012cba493c
Op model (#403)
* Separating raw FuncOp from OpModel WIP

* Model compiles, fighting with transform

* Refactoring WIP

* transform compiles

* Fixing AquaCompiler WIP

* Compiler compiles WIP

* AquaContext's allFuncs, allValues

* WIP trying to compile the CLI

* It compiles

* It runs and fails to compile

* Compiles wrong way

* fix TopologySpec

* Sugar bugfix

* fix TransformSpec compilation

* fix test compilation

* fix SemanticSpec

* Topology debugging

* TransformSpec fixed

* Do not import aqua.model

* Take parts in Semantics

* Fix for re-exports

* Maybe a fix for streams

* Maybe a fix for declarations

* streamArgs.aqua in test examples

* more aqua code with bugs

* FuncOp removed

* removed wrapNonEmpty

* fix TransformSpec

* fix SemanticSpec compilation, delete FuncOps

* Separated model/res, model/inline

* tiny fix

* Tests fixed

* TreeNode to wrap labels into cofree standard way

* TreeNodeCompanion with defauls show, equalsOrShowDiff for all Cofree trees we have

* Simple TagInlinerSpec

* Failing test in TagInlinerSpec

* test wip

* test fixed

* delete Node

* delete test-kit, move tests

* fix constants

* Failing TagInliner test

* More complex case for TagInlinerSpec

* TagInlinerSpec fix

* Split RawValueInliner, TagInliner

* Dumb case for ArrowInlinerSpec

* spec for stream renaming

* renaming stream test

* Exports fixed

* SeqModel.wrapWithEmpty for tests

* Deleted EmptyModel

* Bring back EmptyModel

* ArrowInlinerSpec wip

* ArrowInlinerSpec fixed

* Test fixed

* fix

* stream in callback test WIP

* Slightly better logging for TagInliner

* add example in aqua

* test update

* Removed occasional abilities override

* test

* AquaCompilerSpec WIP

* AquaCompilerSpec failing

* AquaCompilerSpec fixed

* fix test

* compiler test, add RestrictionTag

* break test

* fix stream passing to box arguments

* fix exports in context

* Do not reexport builtins

* init for topology bug

* test for topology

* Reproduced the import-reexport bug

* Hops are working...

* Issue #397 does not reproduce!

* foldJoin reproduces the bug

* Reexports inefficiently fixed

* Topology test fixed

* topology bug

* Cache compiled parts

* Cache compiled parts

* ignore the wip topology test

* delete test

* hanging

* add builtin

* Use linked-data-structure `equals` instead of recursive `hashCode`

* A bit more logs

* eq is faster than ==

* Try to join one by one

* op.identity for join

* reverting op.noop for join

* Fix for renaming when value has the same name as argument

* Bump the version to .6

* broken test for names

* second test for renaming

* this test works but i must break it

* add index in call

* JoinModel breaks test

* the test works fine with a fix, but we should check it closely. and `foldJoin.aqua` integration test become broken

* broken test with xor

* Fixed naming issue for lambda's variables substitution

* Topology bug wip

* Fixes #397

* Maybe fix

Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
2022-01-31 14:48:13 +03:00
Dima
255c1f61b5
VarModel -> VarRaw in collect functions (#405) 2022-01-20 07:08:26 +03:00
Dmitry Kurinskiy
061e896b63
Model/raw refactoring (#398)
* Introducing model/raw subproject

* ValueRaw WIP

* ValueRaw WIP

* ValueModel.fromRaw WIP

* Recursive variables renaming

* Tests

* recursiveRaw

* Arrow Inliner refactoring

* desugarize takes its place WIP

* Sugar.desugarize maybe works

* Some movings/renamings

* Compile bug fixed

* Updated scalafmt

* Fix for service defaultId

* Map values recursively
2022-01-13 10:32:59 +03:00
Dima
a051ab0efc
Network info services for aqua CLI (#393) 2021-12-30 13:44:31 +03:00
Dima
082293a4e2
Upload file to Fluence IPFS sidecar (#390) 2021-12-24 15:50:12 +07:00
Dmitry Kurinskiy
22778914ca
Topology refactoring & fixes (#371)
* Topology optimization for Folds

* cache RawCursor's parent for better performance

* Tests fixed

* wip

* wip

* Use the new Topology to find paths

* Compile bug fixed

* Old tests works

* One more fixed test

* Move before seq next

* One more fixed test

* Bugfix

* Disabled debug output

* maybe fix?

* maybe fix?

* Topology wip

* Maybe fix

* Maybe fix

* Fold optimization

* Root topology

* Respect forceExit in endsOn

* better caching

* better caching

* Root afterOn = const

* XorGroup endsOn should break

* no EndsOn for Root

* Maybe better?

* Uncycling

* Eval

* Respect ParTag.Detach

* Detach test

* Detach test failing

* Detach test fixed

* Go to relay via relay

* Fixes #380

* Increment Aqua version to 0.5.2

* Add image to transform readme, update dependencies

* Review fixes

* Updated Scala version in the release flow
2021-12-22 15:21:37 +03:00
Dima
afbdf69438
fix error when no variables in arguments (#388) 2021-12-22 11:28:38 +03:00
Dima
71ea87aefd
#374 Pass structures to aqua run as JSON from an argument or a file (#386) 2021-12-10 14:39:26 +03:00
Dima
3e762d6654
#370 #377 #378 Builtin as default import and minor changes (#384) 2021-12-03 20:30:00 +03:00
Dima
9fa6e9f7b3
#366 Add secret key option #373 Handle timeout errors (#381) 2021-11-26 15:51:32 +03:00
folex
556c21c5ef
CLI: Implement create_keypair (#375) 2021-11-26 14:05:24 +03:00
Dmitry Kurinskiy
8c22a69840
Detach for par (#369) 2021-11-25 12:11:45 +03:00
Dima
7ec3575a84
Add features #362 #363 #367 #357 to run command (#368) 2021-11-25 11:01:08 +03:00
Dima
324bea5aec
add init_peer_id in oputput (#365) 2021-11-24 13:35:28 +03:00
Dima
ae27dcb534
stringify args, add timeout option (#360) 2021-11-19 17:17:47 +03:00
Dima
4eb272e953
Support new fluenceJS version in run command. Print results of a function (#358) 2021-11-17 10:56:42 +03:00
Dmitry Kurinskiy
27b885f12d
#321 restricted stream scopes (#359) 2021-11-17 08:25:06 +03:00
Dima
3665abe4b7
#320 Script storage option (#355) 2021-11-05 12:03:40 +03:00
Dmitry Kurinskiy
0eab86dc4c
Closures syntax (#327) 2021-11-04 19:22:57 +03:00
Dima
b11a76cfc6
#337 Delete duplicated errors (#352) 2021-11-02 17:33:17 +03:00
Dima
8c9497b9cb
#322 unclear error message if parentheses are missing (#353) 2021-11-02 17:25:34 +03:00
Dima
dacf4d63dc
Fix target resolving (#336)
* fix and add test

* Update cli/src/main/scala/aqua/files/AquaFileSources.scala

Co-authored-by: folex <0xdxdy@gmail.com>

* fix PR

Co-authored-by: folex <0xdxdy@gmail.com>
Co-authored-by: Dmitry Kurinskiy <dmitry@fluence.one>
2021-10-25 22:32:25 +03:00
Dima
058a83fa7f
fix node_modules import (#328) 2021-10-14 12:15:42 +03:00
Dima
3844d8f2db
Run aqua code from CLI (#324) 2021-10-13 11:10:10 +03:00
Dima
93dec7846c
Check service definition fields in TS and JS, fix functions and services count in output (#305) 2021-09-17 11:21:04 +03:00
Dima
b0c193a42c
Error formatting, fix dry run, fix aqua extensions in imports (#301) 2021-09-14 14:42:11 +03:00
Dima
46a972714c
Use and export without .aqua extension, flag for a dry run, create output directories (#299) 2021-09-13 13:08:15 +03:00
Dmitry Kurinskiy
5b8a253fe7
Readme updates (#295)
* NPM installation guide in the README.md

* NPM badge

Co-authored-by: Dima <dmitry.shakhtarin@fluence.ai>
2021-09-10 17:36:21 +03:00
Dima
7362b46384
Fix incorrect resolving pushing stream from func to a value (#275) (#297) 2021-09-10 14:36:01 +03:00
Dima
d881f5bdbe
Upper cased constants (#260) 2021-09-07 11:09:48 +03:00
Dima
621e06dd9c
Fixes version display and empty module compilation (fixes #264 #265) (#274) 2021-09-07 11:02:36 +03:00
Dima
5fd54b5656
make import flag optional (#255) 2021-08-27 16:23:52 +03:00
Dima
dae234dc5a
Performance improvement: single parser instance (#254) 2021-08-27 15:57:44 +03:00
Dmitry Kurinskiy
3de8571be9
Imports bugfixes (#249) 2021-08-21 11:10:38 +03:00
Dmitry Kurinskiy
b9af20339b
Module and Use expressions (#245)
* Module and Use expressions

* UseFromExpr

* ImportFromExpr

* PubExpr

* Export, declares

* Collecting all the needed info WIP

* Got all the needed data

* Tests fixed

* HeaderSem

* HeaderSem wip

* Everything except `export`/`declares` should be working

* Compile bug fixed

* Fix readme: cli/assembly

* Handle declares, exports

* Compile only exports in AquaRes

* Call services imported from modules

* Import consts, types, services from modules

* Resolve arrows from modules

* Bugfix
2021-08-20 18:03:47 +03:00
Dima
296c64836d
Js build (#247) 2021-08-18 13:06:14 +03:00
Dima
f59a93ac27
filter non-aqua files (#246) 2021-08-18 11:49:53 +03:00
Dmitry Kurinskiy
96bc76ef2a
Separate Transform from Model (#244)
* Separate Result from Model

* Result->Transform, docs in README.md
2021-08-16 17:58:15 +03:00
Dima
e2da2e90d7
Crossprojects for JVM and JS platforms (#237) 2021-08-11 19:53:36 +03:00
Dima
4ccac9bf0e
Migration to Scala 3 (#228) 2021-08-06 13:33:58 +03:00
Dmitry Kurinskiy
e3716f6f31
Converting compiler to a pure function (#217)
* Trying to make the compiler a pure function

* Pure compiler WIP

* Compiler should be working now

* printlns

* printlns

* printlns

* fix, delete printlns

* more logs

* fix import resolving, more tests

* fix imports, add tests for imports resolving

* fix test

* correct paths to targets, correct output

* refactoring, create directories to file if not exist

* small changes

* fix test

* Tiny fixes WIP

* Tiny fixes

* Incrementing base version, as host_peer_id is added (fixes #218)

* render error messages, WIP

* small fix

* get src for lexer error

* wrap parser error

* add list of errors

* Handle file write errors accurately

* Use show syntax

* fix test

* fix test

* fix test

* println

Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
2021-08-03 17:23:28 +03:00
Dima
f455716548
Bug fix (#198) 2021-07-14 16:09:10 +03:00
Dmitry Kurinskiy
d24e77b5e3
Removing IO from compiler submodule (#186)
* Removing IO from compiler submodule (wip)

* move targets to cli
2021-06-30 09:21:40 +03:00
Dima
f15bd0558b
Cli/compiler refactoring (#184) 2021-06-29 16:31:20 +03:00
Dima
5e1ef6e227
Abstract backend (#182) 2021-06-25 10:25:27 +03:00
Dima
3236f91db2
101 last line comment (#179) 2021-06-22 11:32:27 +03:00
Dima
29af3e7875
170 pass constants as arguments (#171) 2021-06-15 20:44:55 +03:00
Dmitry Kurinskiy
ee23ffeb9e
Introduce Catch espression (#162) 2021-06-10 16:33:01 +03:00
Pavel
6522deccb4
Javascript backend (#161)
Add javascript backend
2021-06-10 13:43:46 +03:00
Dmitry Kurinskiy
4696e95129
Model refactoring to isolate imports, exports (#156)
* Model refactoring to isolate imports, exports

* Filter duplicate errors

* Do not export imports

* Add types to ServiceModel, AquaContext

* Print compiler version in AquaCli
2021-06-08 15:55:06 +03:00
Dima
6a96098227
possible to use file as input (#152) 2021-06-03 15:45:09 +03:00
Dima
d1e76c1fd3
fix paths finally (#145) 2021-06-01 20:43:44 +03:00
Dima
6ba9c13c63
extension for air target (#143) 2021-06-01 12:34:13 +03:00
Dima
582dab20b7
Hotfix delete println (#140) 2021-05-31 22:00:26 +03:00
Dima
ccc3e89775
hotfix paths (#138) 2021-05-31 14:40:11 +03:00
Dima
f34cd3a4e2
120 improve output (#137) 2021-05-31 12:50:31 +03:00
Dima
33a7cde082
Bug fix (#131) 2021-05-27 12:45:15 +03:00
Dima
9f5c0d64ed
Bug fixes (#127) 2021-05-24 11:00:45 +03:00
Dima
720de27f14
Parsing refactoring (#111)
* WIP, nothing work

* delete ParExpr, ParSem, rewrite exprs, RootCompanion, WIP

* list of tokens to tree

* fix leaf ast

* move expr

* it works?

* small changes

* handle errors

* some refactoring

* WIP

* WIP

* merge

* comments, cleaning up

* split Companion and RootCompanion

* clean up

* couple tests

* fix tests

* ParPrefix?

* Expr code reorganisation

* ParExpr/ParSem returned

* Test fixed

Co-authored-by: dmitry <dmitry@fluence.one>
2021-05-20 16:12:13 +03:00
Dmitry Kurinskiy
a8fd7f5c13
CLI: Version flag and help flag must take precedence over everything else (#122) 2021-05-14 16:22:34 +03:00
Dima
3066e390b7
Parser refactoring (#104) 2021-05-05 10:47:55 +03:00
Dmitry Kurinskiy
53ad29ab31
Config options to omit xor wrapper, relay passing (#105) 2021-04-30 11:43:48 +03:00
Dima
ca8e3bfa40
Constant expr (#79) 2021-04-22 16:42:08 +03:00
Dmitry Kurinskiy
433b464a36
67 plain air gen (#78)
* Refactoring ForClient to make its parts reusable/recomposable

* Func transformation decomposed into parts

* Improves AIR compilation target
2021-04-20 16:44:06 +03:00
Dmitry Kurinskiy
7512648cd0
69 wrong varnames (#74)
* Bug #69 reproduced in test

* Bug #69 reproduced in a test

* Fixes #47 (allow arg names in service function definitions)

* ServiceModel

* AbilityModel is removed, as it's unused

* Fixes #65: expose %init_peer_id% as a literal

* Removed FuncResolved, as it's not resolved actually

* Fixes #69

* Helpers for func op showing & building

* Compile bug fixed

* Comments

* Removed ScriptModel.enqueue
2021-04-19 16:22:45 +03:00
Dmitry Kurinskiy
6ec999c5b6
Pass sbt version to JAR file (#55) 2021-04-14 14:15:27 +03:00
Dmitry Kurinskiy
970da2e1b7
30 import basics (#49)
* Functions must be marked with `pub` to be exported

* AquaFiles WIP

* Factoring out linker

* Core linker logic

* FileModuleId WIP

* AquaFile WIP

* AquaFiles WIP

* Basic imports works

* Show errors

* Dirty hack to make imports work (almost)

* Better errors displaying

* Simplified AquaCompiler interface

* Write compiled files

* New AquaCli

* CLI fixed, works

* Review fixes
2021-04-13 16:05:31 +03:00
Dima
50e335bc76
Builtins (#46) 2021-04-12 10:40:28 +03:00
Dmitry Kurinskiy
0de43b470e
39 fix callbacks (#43)
* Project layout reorganized

* Topology resolution extracted to a separate file

* FuncResolved class

* aqua.model.transform

* Basic bubbling

* Get more context into topology resolver

* Failing Topology test

* Get back in seq

* OnTag.via: List changed to Chain, as via is reversed and concatenated quite frequently
2021-04-06 19:01:25 +03:00