-
Notifications
You must be signed in to change notification settings - Fork 55
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
Program startup/shutdown #44
Comments
We could, like Go, do https://medium.com/golangspec/import-declarations-in-go-8de0fd3ae8ff |
What about scheduled tasks (appointments)? They need to keep program alive. Tasks are scheduled via ballerina/task library functions. |
We should also consider how |
We should also think about #101 at the same time. |
The following aspects of the current design make me feel uneasy
|
My current preference would be:
|
How is the root module identified? |
Following describes the proposed behavior in the upcoming packerina specification.
IMO, root module is a module that has a |
We discussed removing the latter (build without an arg generating multiple binaries) in the last call right? Or did we conclude we want to keep it? I think its very confusing for users. I'm ok with James has proposed (and this is what we had which we removed ...) but we need to make sure the UX is acceptable simple cases: when the user only has a single public entrypoint (possibly called main even) then it should not require to name the entrypoint. |
I believe we decided not to do the generating multiple binaries thing. I agree it is confusing. It could be an option, but it shouldn’t be the default behaviour with no args. |
Some projects might have more than one module with an entry point. A common use-case would be a micro-services project with multiple services divided in to modules. And a user will want to build executable for each service with a single build. One solution is to capture which modules to build in Ballerina.toml and build those when you execute build command. |
Yes that's possible .. but given we don't allow circular imports, each root
module is the start of a tree.
I'm ok with having a TOML option to set a list of root modules as long as
the default works without any setting. Plus we can do this after the
initial release.
…On Wed, Jun 19, 2019, 7:25 AM Joseph Fonseka ***@***.***> wrote:
Some projects might have more than one module with an entry point. A
common use-case would be a micro-services project with multiple services
divided in to modules. And a user will want to build executable for each
service with a single build.
One solution is to capture which modules to build in Ballerina.toml and
build those when you execute build command.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#44?email_source=notifications&email_token=AAR7FPHPXHG47AYPBUSDFXLP3GYL7A5CNFSM4HBNM3XKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYAUSSI#issuecomment-503400777>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAR7FPFQ6YDD2WKS5G6WYDDP3GYL7ANCNFSM4HBNM3XA>
.
|
In today's call, I suggested layering things a little differently from how we currently do. In the language layer, things are roughly as they are now in the spec but without the "main" phase:
In the platform layer:
|
Not yet clear if we have the right semantics here yet.
In particular, the fact that services in all imported modules are started seems strange, and not very consistent with how
main
is handled. What does it mean for a module import to be unused if the way to use a service is to import it?There have also been requests from Cellery team to restore multiple entry point capability.
The text was updated successfully, but these errors were encountered: