| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix: take `include_tests` into account for module AST cache (#5137) ## Description closes #5136. We build contract projects twice, once without tests to get contract bytecode for forc-test's deployment step. (Since contract project's unit tests needs to make contract calls, we need the contract deployed to local vm instance.) And once with the tests included if the user executes `forc test`. This is only needed for contract projects as we only need to deploy them for testing. Module cache addition in 255350ec5018a4a5cea9f0a2280a62830262201a only takes path into account for key. But same source file with and without tests enabled creates different AST's and thus we should also take `include_tests` variable into account. We were missing contract tests because we could not build them with tests. 1st run were building them correctly without the tests and populated the cache, only taking `Path` into account. Second time, although we passed `include_tests = true`, (thus the resulting AST is going to be different for the same file) rather than creating the AST with the tests, we were using the cached version. This was causing contract's to lose tests entries. | 2 年前 | |
fix: take `include_tests` into account for module AST cache (#5137) ## Description closes #5136. We build contract projects twice, once without tests to get contract bytecode for forc-test's deployment step. (Since contract project's unit tests needs to make contract calls, we need the contract deployed to local vm instance.) And once with the tests included if the user executes `forc test`. This is only needed for contract projects as we only need to deploy them for testing. Module cache addition in 255350ec5018a4a5cea9f0a2280a62830262201a only takes path into account for key. But same source file with and without tests enabled creates different AST's and thus we should also take `include_tests` variable into account. We were missing contract tests because we could not build them with tests. 1st run were building them correctly without the tests and populated the cache, only taking `Path` into account. Second time, although we passed `include_tests = true`, (thus the resulting AST is going to be different for the same file) rather than creating the AST with the tests, we were using the cached version. This was causing contract's to lose tests entries. | 2 年前 | |
Merge std and core libraries (#6729) ## Description Merges the two libraries. They were initially separate to separate the core logic and fuel vm specific functionality, but that separation is no longer maintained so having a merged library is better. Closes #6708 ## Checklist - [ ] I have linked to any relevant issues. - [ ] 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) - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [ ] 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: Sophie <47993817+sdankel@users.noreply.github.com> Co-authored-by: Igor Rončević <ironcev@hotmail.com> | 1 年前 | |
fix: take `include_tests` into account for module AST cache (#5137) ## Description closes #5136. We build contract projects twice, once without tests to get contract bytecode for forc-test's deployment step. (Since contract project's unit tests needs to make contract calls, we need the contract deployed to local vm instance.) And once with the tests included if the user executes `forc test`. This is only needed for contract projects as we only need to deploy them for testing. Module cache addition in 255350ec5018a4a5cea9f0a2280a62830262201a only takes path into account for key. But same source file with and without tests enabled creates different AST's and thus we should also take `include_tests` variable into account. We were missing contract tests because we could not build them with tests. 1st run were building them correctly without the tests and populated the cache, only taking `Path` into account. Second time, although we passed `include_tests = true`, (thus the resulting AST is going to be different for the same file) rather than creating the AST with the tests, we were using the cached version. This was causing contract's to lose tests entries. | 2 年前 |