Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

[Move-package] Enable bytecode as dependencies #865

Conversation

rahxephon89
Copy link
Collaborator

@rahxephon89 rahxephon89 commented Feb 1, 2023

Motivation

Re-enable the feature to use bytecode as dependencies when compiling Move programs.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Add later

@rahxephon89 rahxephon89 force-pushed the bytecode-compilation-aptos-main branch 4 times, most recently from a6cd3f0 to 5788f3c Compare February 3, 2023 00:22
@wrwg wrwg requested a review from tzakian February 3, 2023 06:14
@rahxephon89 rahxephon89 force-pushed the bytecode-compilation-aptos-main branch 2 times, most recently from f0f6c1a to d866bf8 Compare February 7, 2023 00:31
@rahxephon89 rahxephon89 changed the title [Test-only][Move-package] Enable bytecode as dependencies [Move-package] Enable bytecode as dependencies Feb 7, 2023
@rahxephon89 rahxephon89 force-pushed the bytecode-compilation-aptos-main branch from d866bf8 to f4b8833 Compare February 7, 2023 01:33
@rahxephon89 rahxephon89 marked this pull request as ready for review February 7, 2023 01:33
@rahxephon89 rahxephon89 requested review from tnowacki and wrwg February 7, 2023 01:33
@rahxephon89
Copy link
Collaborator Author

Hi @tnowacki @tzakian, although it will not be landed on main, could you take a look and give some feedback? Thanks!

Comment on lines 66 to 67
// Remove bytecode files
deps.retain(|p| !p.path.as_str().ends_with(MOVE_COMPILED_EXTENSION));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain the reasoning to remove bytecode files from deps?

Targets means that the compiler is intended to produce bytecode modules for those sources files, which I'm not sure makes sense here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point, deps may already contain paths to mv files that are used as external dependencies, which will cause panic later when calling the function parse_file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the "interface" files have been generated at this point right? Would it make sense to just remove the .mv files from deps after generating the source files for them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the advice Todd! I moved the code to here. I am wondering whether it makes more sense?

@rahxephon89 rahxephon89 requested a review from tnowacki February 7, 2023 18:46
@rahxephon89 rahxephon89 force-pushed the bytecode-compilation-aptos-main branch 2 times, most recently from c0dd054 to 4d24d3d Compare February 13, 2023 07:34
@rahxephon89 rahxephon89 force-pushed the bytecode-compilation-aptos-main branch from 4d24d3d to b9c5539 Compare February 16, 2023 03:05
kklas added a commit to kklas/sui that referenced this pull request Oct 10, 2023
kklas added a commit to kklas/sui that referenced this pull request Nov 24, 2023
kklas added a commit to kklas/sui that referenced this pull request Nov 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants