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 error messages for missing build dependencies #8847

Closed
ericzbeard opened this issue Jul 1, 2020 · 2 comments
Closed

Improve error messages for missing build dependencies #8847

ericzbeard opened this issue Jul 1, 2020 · 2 comments
Assignees
Labels
feature-request A feature should be added or improved. in-progress This issue is being actively worked on. management/devenv Related to CDK development/build environment package/tools Related to AWS CDK Tools or CLI

Comments

@ericzbeard
Copy link
Contributor

I'd like to spend some time working on the experience for a new contributor who misses some of our dependencies. You end up getting pretty deep into a build before you discover things like missing .net core, or that you have a globally installed version of typescript/tslint that is not compatible. The error messages you get from the build are hard to interpret.

Proposed Solution

Add checks early in the build process to look for the correct version of all dependencies and emit a clear error message.

Other

Here's an example that I think is the result of not installing .net core:

FAIL test/init.test.js (6.873s)
aws-cdk: ● verify "future flags" are added to cdk.json
aws-cdk: Could not add project AwsCdkTestHnYKc5.csproj to solution AwsCdkTestHnYKc5.sln. Error code: 127
aws-cdk: at ChildProcess. (../../../../../../private/var/folders/hw/7qx39xm96h719bjttttbf_903hyzmd/T/aws-cdk-testHnYKc5/tmp/add-project.hook.ts:29:16)

  • [ x] 👋 I may be able to implement this feature request

This is a 🚀 Feature Request

@ericzbeard ericzbeard added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 1, 2020
@ericzbeard ericzbeard self-assigned this Jul 1, 2020
@github-actions github-actions bot added the @aws-cdk/core Related to core CDK functionality label Jul 1, 2020
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Jul 7, 2020
@eladb eladb removed their assignment Jul 8, 2020
@eladb eladb changed the title [core] Improve error messages for missing build dependencies Improve error messages for missing build dependencies Jul 8, 2020
@eladb
Copy link
Contributor

eladb commented Jul 8, 2020

P.S. we don't consider this a "core" issue. Perhaps "build"

@SomayaB SomayaB added package/tools Related to AWS CDK Tools or CLI management/devenv Related to CDK development/build environment and removed needs-triage This issue or PR still needs to be triaged. @aws-cdk/core Related to core CDK functionality labels Jul 8, 2020
mergify bot pushed a commit that referenced this issue Jul 14, 2020
This PR is difficult to test, since it's checking for globally installed dependencies like Java, Dotnet, etc. I'm concerned mostly about the effects on our build process, since there may be regex patterns for valid installed versions that I missed.

Hopefully it will have a positive influence on adoption for new contributors by telling them exactly what they are missing before getting deep into a build and seeing confusing error messages.

Closes Issue #8847.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@ericzbeard
Copy link
Contributor Author

Fixed by #8929

curtiseppel pushed a commit to curtiseppel/aws-cdk that referenced this issue Aug 11, 2020
This PR is difficult to test, since it's checking for globally installed dependencies like Java, Dotnet, etc. I'm concerned mostly about the effects on our build process, since there may be regex patterns for valid installed versions that I missed.

Hopefully it will have a positive influence on adoption for new contributors by telling them exactly what they are missing before getting deep into a build and seeing confusing error messages.

Closes Issue aws#8847.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. in-progress This issue is being actively worked on. management/devenv Related to CDK development/build environment package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

3 participants