-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat: Add forc-publish plugin #6890
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JoshuaBatty
reviewed
Feb 5, 2025
JoshuaBatty
reviewed
Feb 5, 2025
JoshuaBatty
previously approved these changes
Feb 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK. Wasn't able to test locally but the code changes here look good.
zees-dev
reviewed
Feb 9, 2025
zees-dev
reviewed
Feb 9, 2025
zees-dev
reviewed
Feb 9, 2025
zees-dev
reviewed
Feb 9, 2025
zees-dev
reviewed
Feb 9, 2025
zees-dev
reviewed
Feb 9, 2025
zees-dev
reviewed
Feb 9, 2025
## Description `type_check_method_application` does the parsing of arguments in 2 passes, but when the `resolved_method_name` failed the argument error would not be displayed. We now store the arg_handlers and append their errors in case `resolve_method_name` fails. Fixes #5660 ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [ ] I have requested a review from the relevant team or maintainers. Co-authored-by: Joshua Batty <[email protected]>
## Description closes #6861 `forc` was allowing dependency name being the same (through the use of `package` alias and the declaration itself) as the project name. The following two cases are now invalid and produces an error on the forc-pkg side before going to the compiler. ```TOML [project] authors = ["Fuel Labs <[email protected]>"] entry = "main.sw" license = "Apache-2.0" name = "lib_contract" [dependencies] lib_contract = { path = "../lib_contract_abi/", package = "lib_contract_abi" } ``` and ```TOML [project] authors = ["Fuel Labs <[email protected]>"] entry = "main.sw" license = "Apache-2.0" name = "lib_contract_abi" [dependencies] lib_contract = { path = "../lib_contract_abi/", package = "lib_contract_abi" } ``` --------- Co-authored-by: Joshua Batty <[email protected]>
## Description closes #6721. There were couple of issues: 1. Archive unpacking was getting the bytes from `text` field of response to the IPFS gateway which was adding additional stuff that messes with unpacking routine. 2. Folder name was invalid so forc was unable to find the packages in the `ipfs` cache. Both issues are addressed and this unblocks forc to fetch ipfs fetched packages once again. Next up on our package registry push is to enable alternative sources and set the precedence for them. Also added some tests around extracting logic, which inserts the contents under a directory named after `CID` as this is how `forc` is looking for these sources in the first place (related to point 2 above)
CodSpeed Performance ReportMerging #6890 will not alter performanceComparing Summary
|
JoshuaBatty
approved these changes
Feb 11, 2025
zees-dev
approved these changes
Feb 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes #6889
Currently it only works when running locally, as the forc.pub server is not yet live. Allows users to publish a package by running
forc publish
in the root of the package directory. Workspaces not yet supported.It's intentionally not yet added to the release process (will be done in #6891)
To test it locally, run the forc.pub server and web app locally (see that repo's README for more details).
std-lib-core/Forc.toml
and add a version key, i.e.version = 0.1.0
forc publish
from this branch: feat: Check and store package dependencies in database forc.pub#29 and you'll be prompted to enter the token.Checklist
Breaking*
orNew Feature
labels where relevant.