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

Get daml build to issue a WARN if the resultant package is too large #19341

Open
raphael-speyer-da opened this issue Jun 6, 2024 · 0 comments

Comments

@raphael-speyer-da
Copy link
Collaborator

raphael-speyer-da commented Jun 6, 2024

What is the problem you want to solve?

If a daml package is very large, it can cause problems for clients that have to block processing to download and parse it. Ideally application logic should be split into independent, modular components, which can exist in separate packages.

What is the solution you would propose?

Have the daml compiler issue a warning when the resultant dar is excessively large. The message could link to documentation describing how to split packages up, and discussing the rationale for doing so.

The threshold size is TBD, but could perhaps be configurable.

Describe alternatives you've considered

Status quo

We have observed that over time packages can grow larger incrementally, and cause progressively more problems for tooling and clients.

Warning at the UploadDarFile stage

This could be done as well, but is later in the process. The daml build is the earliest stage at which we can determine the package size.

Additional context

There has been discussion of setting the max-inbound-message-size for GRPC to be a very high value in ledger clients we build, so that we don't get unexpected failures when issuing rpc's like GetPackage which can have a large payload in the response. This may work as long as the clients can actually handle the large responses at a memory level, but skirts around the fact that processing which requires loading a new package before continuing will still increasingly stumble if package sizes become excessive. This is about helping to avoid this situation earlier if possible.

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

No branches or pull requests

1 participant