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

Remove process.exit commands #467

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Remove process.exit commands #467

merged 2 commits into from
Nov 14, 2023

Conversation

georg-schwarz
Copy link
Member

@georg-schwarz georg-schwarz commented Nov 8, 2023

In the interpreter-lib, there were still some process.exit commands. IMO, only surrounding applications should trigger a process exit.

The details of the FAILURE are logged / can be extracted by injecting a custom logger.

@@ -82,16 +83,25 @@ export async function interpretModel(
', ',
)}.`,
);
process.exit(ExitCode.FAILURE);
return ExitCode.FAILURE;
Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder if we should distinguish between different kinds of FAILURES, like CONFIGURATION_FAILURE, RUNTIME_FAILURE, RUNTIME_ERROR, and so on.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good, yeah. Note though, this is the exit code of the process so we can not freely define new ones (afaik). We definitely should have some form of more elaborate error output outside of the exit code though, like writing a logfile.

@georg-schwarz
Copy link
Member Author

I want to draft a release after integrating this. Should we do version v0.2.0 to keep v0.1.x reserved for people using the current version and only supply bug fixes there?
In theory, there should be no breaking changes - but I wouldn't guarantee for not having introduced bugs with the refactorings like #460.

@rhazn
Copy link
Contributor

rhazn commented Nov 9, 2023

I want to draft a release after integrating this. Should we do version v0.2.0 to keep v0.1.x reserved for people using the current version and only supply bug fixes there? In theory, there should be no breaking changes - but I wouldn't guarantee for not having introduced bugs with the refactorings like #460.

I am not sure this doesn't change behavior. Was the cli-interpreter always also just returning exit code 1? Because otherwise, this is also a change in functionality that would mean 0.2.0 imho. But if there is no behavior change we should go with 0.1.1 and trust the tests I think?

Maybe in the future we should do some MADE only releases (e.g. release v.WS2324.MADE) so we can be more flexible with keeping a stable version for MADE and still release new versions for general users.

@georg-schwarz georg-schwarz merged commit f91d37e into main Nov 14, 2023
2 checks passed
@georg-schwarz georg-schwarz deleted the remove-process-exit branch November 14, 2023 14:17
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 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.

2 participants