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

Improve the generated project build capability #200

Merged

Conversation

yinan-symphony
Copy link
Contributor

@yinan-symphony yinan-symphony commented Jun 23, 2022

Before this commit, the generation process would stop in case the build
on the generated project fails. For instance, the package manager wrapper
cannot be downloaded due to network issue.

This commit improves the project build capability by tring to run
a the build again by using a local package manager in case there is an
issue when build fails using wrapper. In addition, no matter what the build
status is, the generation process will continue to the end.

Description

Closes #199

@yinan-symphony yinan-symphony requested a review from a team June 23, 2022 09:47
@yinan-symphony yinan-symphony force-pushed the bugfix/local-package-manager branch from 3814c67 to 02b7a42 Compare June 23, 2022 09:49
README.md Outdated
@@ -31,6 +31,10 @@ export https_proxy=http://localhost:3128
```
Symphony Generator will automatically fetch the latest version of BDKs/WDK and use it to generate your project. In case the request fails, it will fallback on a default version.

Once the project is generated, the generator will try to download the chosen package manager wrapper to build the project, if for any reason (e.g. network constraint) the build fails, the generator will then try to build project again by using local package manager.
Copy link
Contributor

@symphony-soufiane symphony-soufiane Jun 23, 2022

Choose a reason for hiding this comment

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

We can improve this line IMO. Let's mention it is specific to BDK Java bots.

Suggested change
Once the project is generated, the generator will try to download the chosen package manager wrapper to build the project, if for any reason (e.g. network constraint) the build fails, the generator will then try to build project again by using local package manager.
In case of a Java bot application, once the project is generated, the generator will try to download the chosen package manager wrapper to build it. If for any reason (e.g. network constraint) the build fails, the generator will then try to build the project again by using local package manager.

this.spawnCommandSync('gradle', ['build']);
} catch(e) {
this.log(`${e}`.green.bold);
console.log(errorMessage);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it done on purpose to not show the actual error? only "Failed to build the generated project?".
How can users figure out why the generation failed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the actual error is shown by the line 209. The error message is a generic message.
and as i mentioned this morning, the real error message will display by all means.

@yinan-symphony yinan-symphony force-pushed the bugfix/local-package-manager branch from 02b7a42 to ddfb10d Compare June 23, 2022 20:00
Before this commit, the generation process would stop in case the build
on the generated project fails. For instance, the package manager wrapper
cannot be downloaded due to network issue.

This commit improves the project build capability by tring to run
a the build again by using a local package manager in case there is an
issue when build fails using wrapper. In addition, no matter what the build
status is, the generation process will continue to the end.
@yinan-symphony yinan-symphony force-pushed the bugfix/local-package-manager branch from ddfb10d to 6d27087 Compare June 23, 2022 20:02
@yinan-symphony yinan-symphony merged commit f89d1e6 into finos:master Jun 24, 2022
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

Successfully merging this pull request may close these issues.

Handle maven wrapper download failure without internet
2 participants