Commit graph

209 commits

Author SHA1 Message Date
John Adler
fdebe28e28
Bump to v0.9.0 (#1043) 2022-03-28 16:59:21 -04:00
Alex Hansen
04d26d6924
v0.8.0 (#1027)
* v0.8.0

* update lockfile

Co-authored-by: Alexander Hansen <alexanderhansen@AlexandersMBP3.home>
2022-03-25 16:40:48 -07:00
Emily Herbert
dff4d64e7a
Generic impl selfs and associated fixes (#913)
* Fix issue where function bodies were not being monomorphized.

* Implement part of generic impl self.

* Remove print statements.

* WIP

* Clippy warnings.

* Create a CompilerWarning to alert users when they have used a type parameter that is not in upper snake case form.

* Prep for change to how type ascriptions are used.

* Implement custom hash type.

* Fix non-deterministic bug.

* documentation

* Introduce types into Custom type.

* Make distinction between type params and type args in parser. Remove stale implementation of generic traits and generic supertraits.

* WIP

* Actually use type ascriptions.

* update

* Add actual TypeArguments.

* Have function application use TypeArgument.

* Improve how types are unified for structs.

* Evaluate type ascriptions recursively.

* Fix broken component.

* Done for structs, minus some edge cases.

* Fix type ascription usage.

* Fix bug with how enums are sized.

* Generic impl selfs works for enums.

* Turbofish works.

* fix bug

* Revert changes to lock file.

* Fix IR test cases.

* Fix bug.

* Tidy up test case.

* PR feedback.
2022-03-25 01:07:47 -05:00
mitchmindtree
75187e98d4
Add support for package field under dependencies. If unspecified, require that dependency name matches package name. (#1002)
* Add `kebab_to_snake_case` function to `forc-util` for dependency names

* Add support for `package` field under `dependencies`

This allows for the dependency name to differ from the dependency's
package name.

Closes #977.

* Add test for forc's dependency `package` field support

* Ensure that pinned package names match their associated manifest

* Update forc lock files of tests that depend on std

It is no longer valid for packages to contain a manifest with a name
that does not match the name of the pinned package within the lock file.
As a result, the lock files of these tests have been invalidated and
regenerated.

* Update context_testing_contract test

* Update caller_context_test

* Fix some minor documenation nits
2022-03-24 10:36:02 +11:00
Chris O'Brien
a09af8f517
Moved find_manifest functions from sway_util into forc_util (#957)
* moved `find_manifest` functions into `forc_util`

Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
2022-03-22 22:35:22 -05:00
John Adler
7dd186041f
Bump to v0.7.0 (#922)
* Bump to v0.7.0

* Fix typo from merge.

Co-authored-by: Alex Hansen <alex@alex-hansen.com>
2022-03-22 11:53:15 -07:00
Alex Hansen
3dda3d297b
Space out errors and warnings for readability (#961)
* Space out errors and warnings for readability

* reset lockfile
2022-03-18 20:59:30 -07:00
John Adler
3268092ce5
Bump to v0.6.1 (#921) 2022-03-10 12:43:48 -05:00
mitchmindtree
ecaf5a22ba
Move forc's util and pkg related code into forc-util, forc-pkg (#901)
* Move forc's util and pkg related code into `forc-util`, `forc-pkg`

This makes a start on #863 by refactoring the "package" handling code
into a `forc-pkg` crate. This new crate is solely responsible for
building, fetching, locking and updating of forc packages.

`forc-pkg` pulls in around 170 dependencies altogether, as opposed to
`forc`'s current ~460. This should be useful for downstream crates that
may want to depend on `forc` without all the bloat of the CLI tooling,
explorer, etc. The `sway-lsp` crate comes to mind.

To achieve this, some of forc's utility functionality has been moved
into `forc-util` so that it may be shared between `forc-pkg` and `forc`
itself.

* Address some clippy nits

* Update tests for parsing the default manifest and test manifest strings

* Fix dependency order in forc-pkg Cargo.toml

* Improve `forc-pkg`, `forc-util` manifest descriptions

Also tweaks the version declarations for forc-pkg dependencies.

* Specify full version for sway deps to be publish-friendly

* Specify full versions for `forc-*` deps ready for publishing
2022-03-09 09:30:35 +11:00