Skip to content
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

Missing main function error should be moved into Nargo #2155

Open
Tracked by #2162
phated opened this issue Aug 3, 2023 · 0 comments
Open
Tracked by #2162

Missing main function error should be moved into Nargo #2155

phated opened this issue Aug 3, 2023 · 0 comments

Comments

@phated
Copy link
Contributor

phated commented Aug 3, 2023

Problem

Currently, the compile_main function creates a diagnostic error if it a main function is missing; however, that error should only occur if the PackageType (as introduced by #2134) is Binary but not if it is Library or Contract.

There is a bit of tangled APIs that result in the current implementation that need to be refactored to make this possible.

Happy Case

The error should only happen if the PackageType is Binary, otherwise different errors would be given (such as "Missing contracts").

Alternatives Considered

No response

Additional Context

This will likely be included in the solution to #2075

Would you like to submit a PR for this Issue?

Yes

Support Needs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants