Commit graph

502 commits

Author SHA1 Message Date
Mohammad Fawaz
0f84734f6f
Bump to v0.25.0 (#2942)
- Also ran `cargo update`.

Pending:
- [x] https://github.com/FuelLabs/sway/pull/2941
- [x] https://github.com/FuelLabs/sway/pull/2940
- [x] https://github.com/FuelLabs/sway/pull/2890
2022-10-05 15:38:50 -04:00
Mohammad Fawaz
ce6260c0f0
Bump a few dependencies (#2896) 2022-10-01 10:18:47 +10:00
Sophie Dankel
e6afd8987e
Add --log-level and --silent to forc (#2870)
Closes https://github.com/FuelLabs/sway/issues/2375
https://github.com/FuelLabs/sway/issues/2362

Related https://github.com/FuelLabs/sway/pull/2798

1. adds a global `--log-level` option.

1. changes "forc completions --shell" short form from "-s" to "-S"
because "-s" is now globally the short form of "--silent"
1. similarly, changes "forc addr2line --search-dir" short from from "-s"
to "-S"
1. adds a global `--silent` option to all forc commands and renames the
old silent mode to "terse mode".

What used to be called silent mode was not really silent; it would still
output 1 line if there were warnings or errors during the build (for
example, during CI runs).
 
There is still a need for a non-global option for terse mode because the
test harness runs the build commands directly (without the CLI), so
there's no way to pass the global options into the command (for example,
`forc::test::forc_check::check` which takes a `forc::cli::CheckCommand`
argument).

I can't simply set the log level to "ERROR" for the test harness
(effectively like a terse mode) because it would be applied to all tests
running in that thread, and some of the tests depend on the INFO output
to stdout to determine if the test passed. To have separate log levels
for `ir_generation` and `e2e_vm_tests`, we'd have to separate those into
separate build steps.
2022-09-28 23:16:58 +00:00
Mohammad Fawaz
e695606d88
Bump to v0.24.5 (#2840)
Co-authored-by: Toby Hutton <toby@grusly.com>
2022-09-24 08:22:05 -04:00
Sophie Dankel
56dc0f4105
Make verbose flag a global option in forc (#2798)
Closes https://github.com/FuelLabs/sway/issues/2305

Adds the `--verbose` flag to all forc commands and makes it so
`tracing::debug` logs shows when `-v` or `--verbose` is used, and
`tracing::trace` logs show when `-vv` is used.

If both `RUST_LOG` and the verbose flag are set, the verbose flag takes
precedence.

Tested with permutations of:
```
cargo run -p forc -- clean --verbose
cargo run -p forc -- init -vv
```

Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
Co-authored-by: Kaya Gökalp <kayagokalp@sabanciuniv.edu>
2022-09-22 19:10:15 +00:00
Alex Hansen
c8ce718782
0.24.4 (#2794)
Co-authored-by: Mohammad Fawaz <mohammadfawaz89@gmail.com>
2022-09-16 08:43:02 -04:00
Sophie Dankel
203d85e00a
Replace println with tracing [ops] (#2789) 2022-09-16 00:18:45 +00:00
Sophie Dankel
68351a5423
Replace println with tracing [client] (#2765)
Co-authored-by: Mohammad Fawaz <mohammadfawaz89@gmail.com>
Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
2022-09-15 16:25:59 -07:00
Mohammad Fawaz
95cd150cac
Bump to v0.24.3 (#2766)
Bump to v0.24.3
2022-09-12 11:44:19 -04:00
Mohammad Fawaz
057e83aee8
Bump to v0.24.2 (#2756)
Bump to v0.24.2

Co-authored-by: Alex Hansen <alex@alex-hansen.com>
2022-09-09 11:57:27 -04:00
Mohammad Fawaz
54e1a340e6
Bump to v0.24.1 (#2747)
Bump to 0.24.1
2022-09-07 17:40:03 -04:00
Mohammad Fawaz
0a66f0160e
Disable the generation of logged types in the JSON ABI by default (#2744)
Disable the generation of logged types in the JSON ABI by default and
hide it behind a flag
2022-09-07 11:53:51 -05:00
Mohammad Fawaz
ea4f1b7885
Bump to v0.24.0 (#2730)
* bump to v0.24.0

* Merge with master
2022-09-06 13:01:12 -04:00
Kaya Gökalp
b91bb84b0c
feat: sign forc-run transactions (#2676)
* feat: users can sign while using forc-run

* fix: e2e tests are not passing --unsigned to forc-run

* lock file updated
2022-09-05 01:15:57 +00:00
Mohammad Fawaz
b696495c8f
Bump to v0.23.0 (#2703)
bump to 0.23.0

Co-authored-by: Alex Hansen <alex@alex-hansen.com>
2022-09-02 18:20:32 -04:00
Chris O'Brien
3c83178581
Replace old formatter with new formatter (#2669)
* update plugin and swayfmt toml, remove old formatter

* update config to formatter for consistency

* wip fix lsp formatting

* more merge conflicts

* update dependencies to 22.1

* remove files that made it back in from merge

* comment out function in LSP that uses formatter

* format examples and remove debug printlns

* Merge #2669 (swayfmt replacement PR) with `master` including newline formatting fixes (#2698)

* refactor: forc-deploy requires wallet address and accepts signature (#2629)

* Add the `CopyTypes` trait to `DeclarationId` (#2682)

Co-authored-by: Toby Hutton <toby@grusly.com>

* fix: Unformatted comment spans add extra newline (#2692)

* newline handler checks for existing newlines before inserting new ones

* stability test added

* newline-comment handler interaction test added

* review suggestion

* feat: add basic comment context formatting (#2697)

* feat: add comment context formatting

* test: enhance newline-comment handler interaction test

* Apply suggestions from code review

Co-authored-by: mitchmindtree <mitchell.nordine@fuel.sh>

Co-authored-by: mitchmindtree <mitchell.nordine@fuel.sh>

* Update `examples/` for recent swayfmt-v2 patches

Co-authored-by: Kaya Gökalp <kayagokalp@sabanciuniv.edu>
Co-authored-by: Emily Herbert <17410721+emilyaherbert@users.noreply.github.com>
Co-authored-by: Toby Hutton <toby@grusly.com>

* change name to swayfmt, kashira

* add swayfmt file

* sort toml dependencies

* fix excess newlines in format_context

* test on examples

Co-authored-by: mitchmindtree <mitchell.nordine@fuel.sh>
Co-authored-by: Kaya Gökalp <kayagokalp@sabanciuniv.edu>
Co-authored-by: Emily Herbert <17410721+emilyaherbert@users.noreply.github.com>
Co-authored-by: Toby Hutton <toby@grusly.com>
Co-authored-by: Mohammad Fawaz <mohammadfawaz89@gmail.com>
2022-09-02 11:40:00 -05:00
Kaya Gökalp
7cde107583
refactor: forc-deploy requires wallet address and accepts signature (#2629) 2022-09-02 07:57:42 +10:00
Mohammad Fawaz
c486eabc3e
Bump to v0.22.1 (#2685)
bump to v0.22.1
2022-08-31 22:54:46 -04:00
Mohammad Fawaz
6e1fbca21f
Bump to v0.22.0 (#2673)
* Bump to v0.22.0

* Update lock file
2022-08-31 21:49:35 -04:00
Nick Furfaro
11fd90a14d
Refactor std::tx to use gtf intrinsic (#2482)
* feat: add all gtf const values

* cleanup: remove offset consts and doc comments

* refactor: update tx_type()

* refactor: update tx_script_gas_price()

* refactor: update tx_script_gas_limit()

* refactor: update tx_maturity()

* refactor: remove tx_byte_price()

* refactor: update tx_script_length()

* refactor: update tx_script_data_length()

* refactor: update tx_inputs_count()

* refactor: update tx_outputs_count()

* refactor: update tx_witnesses_count()

* refactor: update tx_receipts_root()

* refactor: update tx_script_start_pointer()

* refactor: update tx_script_data_start_pointer()

* refactor: update tx_script_data()

* refactor: update tx_script_bytecode()

* refactor: update tx_input_pointer()

* refactor: update & rename tx_input_type()

* refactor: update tx_input_owner()

* cleanup" remove redundant tx_input_type() function

* refactor: update tx_predicate_data_start_pointer()

* refactor: rename get_predicate_data()

* refactor: update fn predicate_data() to be generic

* feat: add fn tx_coin_predicate_data_start_pointer()

* refactor: update tx_output_pointer()

* refactor: update tx_output_type()

* refactor: remove tx_output_type_from_pointer()

* refactor: update tx_output_amount()

* refactor: update fn tx_id()

* refactor: hardcode index 0 for tx field getters

* fix: refactor predicate_data & fix implementation

* docs: add GTF hex values to function docs

* docs: commment out consts and make into comments

* Revert "docs: commment out consts and make into comments"

This reverts commit bdca7bbf36.

* cleanup

* cleanup: consts

* feat: add witness related functions to tx

* feat: add mod inputs to std

* Docs: Add high level module docs

* refactor: remove unused imports

* refactor: move all input consts to imputs.sw

* refactor: remove input-related stuff from tx.sw

* refactor: move inputs to inputs.sw

* refactor: complete move of inputs

* reafactor: input owner functions

* refactor: move input predicate data func to inputs

* refactor: extract 2 predicate data functions

* feat: add fn input_coin_output_index

* feat: add fn input_coin_amount()

* chore: cleanup

* refactor: switch to using __gtf intrinsic

* fix: update calls to read() with turbofish

* refactor: use read() consistently

* fix: semicolon

* fixup

* refactor: make tx_gas_price() general-purpose

* refactor: use gtf for fn tx_type()

* refactor: make tx_gas_limit() general purpose

* refactor: make tx_maturity() general purpose.

* refactor: make tx_inputs_count() general purpose.

* fix: use correct type for __gtf

* refactor: fix tx_script length to return an option.

* refactor: switch tx_script_data_length() to return option

* refactor: update fn tx_outputs_count() to use gtf

* refactor: make inputs/outputs count fns general

* refactor: update fn tx_receipts_root() return type

* refactor: update fn tx_script_data_start_pointer() return type

* docs: add comments to tx_type()

* chore: cleanup

* feat: make fn tx_input_pointer() general purpose

* fix: add GTF_OUTPUT_TYPE const

* feat: refactor tx_id() to use gtf intrinsic

* feat: refactor fn tx_input_type() to use gtf

* refactor: switch fn tx_input_owner() to use gtf

* refactor: make predicate_data() use gtf intrinsic

* refactor: make tx_output_pointer() general purpose

* refactor: use gtf intrinsic in tx_output_type()

* refactor: update tx_output_amount() to use gtf

* refactor: revert rather than returning None

* feat: add fn tx_witness()

* docs: add notes

* fix: uncomment const GTF_OUTPUT_TYPE

* refactor: change tx_type to return enum

* fixup

* refactor: rename tx_witness to tx_witness_pointer

* refactor: add enum Output and modify tx_output_type

* refactor: complete tx refactor with new enum types

* refactor: update token.sw to handle enum returns from tx.sw

* refactor: update auth.sw to handle enum returns from tx.sw

* fix: update calls to read()

* fix: add get_predicate_data() back

* test: update tx_field tests

* cleanup

* refactor:start to move funcs to inputs module

* refactor: split out all inputs related things

* feat: add outputs module and refactor

* cleanup

* refactor: move & rename tx_outputs_count()

* fix: changes to fix compile errors

* fix: changes to fix compile errors

* fix: update token & auth modules

* fix: cleanup duplicate function

* fix: update read() calls with type annotations

* test: update tests to handles stdlib changes

* chore: update test/ cargo manifest & lock

* chore: update sdk-harness/ cargo manifest & tests

* chore: update forc/ cargo manifest & lock

* chore: update forc-pkg/ & sway-core/ cargo manifests & lock

* chore: update sway-types/ cargo manifest & lock

* chore: update test-sig-gen-util/ cargo manifest & lock

* chore: update fuel-core in ci.yaml

* cleanup: remove x.. opcodes from allocated_ops.rs

* fix: complete removal of X.. opcodes from allocated_ops

* chore: remove X.. opcodes from virtual_ops and mod.rs

* resolve type annotation

* refactor: remove byte_price & static_contracts

* chore: bump fuel-core to 0.10.1 in ci.yml

* fix: trying to update harness.rs in e2e tests

* chore: add builder feature to fuel-tx dep

* test: fix test harness

* style: clippy

* fix: remove X.. opcodes from op_codes.rs

* fix: remove X.. opcodes from sway-parse/op_codes

* fix: remove byte_price from parameters.rs

* chore: commit updated cargo lockfile

* fix: improve fn naming consistency

* test:  set index to 0

* chore: update lockfile

* test: fix tests to work with patched SDK

* chore: restore cargo manifest file to patchless version

* test: update auth testing contract

* test: update tx_fields tests

* chore: patch SDK with local branch

* temp: add logging to repro while-loop bug

* fixup: temp logs

* chore: bump to SDK v0.21

* test: update tests to use new wallet api

* chore: bump forc-util

* chore: fix merge-conflict in cargo.lock

* test: fix some tx_field tests

* cleanup

* test: cleanup tx_output_type test

* Remove unused deps

* Remove more unused deps

* Restore some deps

* Fix can_get_script_start_offset test

* fix get_tx_id test

* fix can_get_tx_output_type test

* Fix can_get_tx_input_coin_owner test

* Disable mint/transfer tests and hopefully resolve the unused deps issue

* Re-enable the token tests as they actually work now with a fix to token.sw

* Some clean up and removing untested functions

* Add some useful comments and return None as the owner of a message input

* remove dead constants

* fmt

* update the lock file

* Update the SDK version for forc new

* cleanup: remove logging from token.sw

* cleanup: remove stale TODO from test

* style: consolidate imports in test file

* Update comments for output_amount to point to a github issue

* Using if let instead of a match statement

* Link to github issue for testing

* Update some constants based on the old spec until the new spec is implemented

Co-authored-by: Alex Hansen <alex@alex-hansen.com>
Co-authored-by: Mohammad Fawaz <mohammadfawaz89@gmail.com>
Co-authored-by: João Matos <joao@tritao.eu>
2022-08-31 12:59:45 +00:00
Mohammad Fawaz
32b5b142b5
Bump to v0.21.0 (#2651)
Bump to v0.21.0

Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
2022-08-29 22:02:51 -04:00
Mohammad Fawaz
6a8116fcee
Bump to v0.20.2 (#2584)
Bump to v0.20.2
2022-08-18 23:40:55 -04:00
Mohammad Fawaz
21887f4b32
Bump to v0.20.1 (#2578)
* Add forc client metadata to Cargo.toml

* bump to v0.21.1
2022-08-18 15:02:14 -07:00
Mohammad Fawaz
27b023e8ab
Add forc-client metadata to Cargo.toml (#2577)
Add forc client metadata to Cargo.toml
2022-08-18 17:14:10 -04:00
Emily Herbert
fc3a05d87d
Bump to v0.20.0 (#2565)
* bump to v0.20.0

* run cargo update and update forc-client

Co-authored-by: Mohammad Fawaz <mohammadfawaz89@gmail.com>
2022-08-18 15:25:28 -04:00
Kaya Gökalp
1ed1cf1fa0
Split client interaction commands into a forc-client plugin (#2440) 2022-08-18 01:46:12 +00:00
Joshua Batty
7e3c1eb13d
Switch between viewing typed or parsed tokens as warnings in the LSP client. (#2460)
Change forc-lsp to take an optional string for specifying which tokens should be shown as warnings when debugging the language server.

This makes it much more convenient to switch back and forth between inspecting the parsed and typed tokens that have been collected by the language server.
2022-08-09 12:44:53 +10:00
Mohammad Fawaz
6808861389
Bump to v0.19.2 (#2481)
bump to v0.19.2
2022-08-08 15:47:20 -06:00
Mohammad Fawaz
1202e790c1
Bump to v0.19.1 (#2437)
Bump to v0.19.1
2022-08-01 11:11:46 -04:00
Mohammad Fawaz
5c716e1ba5
Bump to v0.19.0 (#2393)
Bump to v0.19.0
2022-07-27 20:00:33 -04:00
Mohammad Fawaz
3bd8eaf4a0
Bump to v0.18.1 (#2304)
bump to v0.18.1
2022-07-11 23:23:17 -04:00
Mohammad Fawaz
ada0d294a6
Bump to v0.18.0 (#2268) 2022-07-08 19:12:28 -04:00
Mohammad Fawaz
b81bcd9652
Bump to v0.17.0 (#2174)
* bump to 0.17.0

* Also run cargo update
2022-07-01 15:12:20 -04:00
Alex Hansen
2e9c381924
Fix new clippy lints. (#2192)
appease clippy
2022-06-30 22:32:19 +01:00
Mohammad Fawaz
7920330d34
Bump to v0.16.2 (#2105)
* bump to v0.16.2

* Fix one test not pointing to local std
2022-06-24 15:02:08 -04:00
Mohammad Fawaz
dcf22453ae
Bump to v0.16.1 (#2037)
Bump to 0.16.1
2022-06-17 23:03:40 +03:00
Mohammad Fawaz
948f7aba42
Bump to v0.16.0 (#1998)
bump to 0.16.0
2022-06-16 13:30:17 -04:00
Kaya Gökalp
78f9dfac87
Add shape field in Formatter struct so that Format trait can reach a common shape. (#1925) 2022-06-10 17:00:29 +03:00
Mohammad Fawaz
eab07e48bc
Bump to v0.15.2 (#1920) 2022-06-09 14:37:56 -04:00
Mohammad Fawaz
a34b4b99fc
bump to 0.15.1 (#1871) 2022-06-06 13:45:20 -04:00
Mohammad Fawaz
ee7822c411
bump to v0.15.0 (#1835) 2022-06-06 11:45:18 -04:00
Chris O'Brien
69466f3a3f
Adds from_dir to new formatter (#1843) 2022-06-05 19:45:05 -05:00
Chris O'Brien
ed600e98af
Adds forc-fmt-v2 plugin (#1803) 2022-06-02 08:42:21 -05:00
Mohammad Fawaz
60c626cf48
bump to 0.14.5 (#1793) 2022-06-01 16:19:51 -04:00
Mohammad Fawaz
b067a7dd64
bump to v0.14.4 (#1753) 2022-05-28 14:52:01 -04:00
Mohammad Fawaz
17f856bfa0
bump to 0.14.3 (#1749) 2022-05-28 14:07:02 -04:00
Emily Herbert
6fc5c69f29
v0.14.2 (#1737) 2022-05-27 14:03:29 -05:00
Alex Hansen
02ef7d10b6
v0.14.1 (#1715) 2022-05-26 22:58:56 -07:00
John Adler
953dad9cad
Bump to v0.14.0. (#1714) 2022-05-26 21:12:03 -07:00
Mohammad Fawaz
dac1b96419
bump to v0.13.2 (#1668) 2022-05-25 18:01:21 -04:00