-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Packaging for beta releases #6
Comments
Why not install those to Yes, you don't technically need the the rest of the CDK install for the Java version, but users won't care about that anyway. "I have the CDK installed" is what they'll think, and they'll have it, and it'll work. |
Agreed on all of the rest. As one more note, I think I'd prefer
For me (at least) that feels more natural. |
Yes, I'll try to avoid. The challenge is when you use an IDE, you need |
I'm not certain I like So the ergonomics I would like to have is more like: cdk init --type=[app|library] --language=[ts|java|dotnet|ruby|...] |
Well yeah, but then all you have to do is start your IDE after updating the PATH. Although I got you, if you start your IDE from a GUI, where does the PATH even come from? |
Let's not over-engineer this at this point. I really want to keep cdk-init dead simple and stupid. There's a high abuse potential for templating engines and we should be very careful not to cross that line... |
I mean, maybe. But we won't have all combinations to start with. Also, I prefer |
@rix0rrr I think we can also offer aliases @eladb The way I see this is very simple... |
Initial implementation for #6 - this change will result in `dist/` containing a bundle that contains: - `node_modules` - with all jsii and CDK modules - `bin` - symlink to __node_modules/.bin__ - `repo/npm` - tarballs for all npm modules (CDK + jsii) - `repo/maven` - jars for jsii and CDK - `docs` - the rendered documentation website
aws-lambda-nodejs have issue * [npm install -g yarn · Issue #6 · nodejs/corepack](nodejs/corepack#6) * [npm install yarn --global fails in docker container · Issue aws#8358 · yarnpkg/yarn](yarnpkg/yarn#8358) From issue comment, > For future reference, you can (should) pin your version rather than use whatever the latest is on npm (by using yarn@1.22.6, etc) - it's a good practice anyway regardless of the conditions, as you never know which bug could slip by us. You can also use the yarn-path setting to ensure that upgrades go through the appropriate review processes (including CI). > > <yarnpkg/yarn#8358 (comment)> So we'll follow it. And from issue comment, > Fwiw we don't plan to add any more features to Yarn 1, as all of our resources have shifted to Yarn 2. The past few commits have been aimed toward making the transition a bit easier, in particular thanks to the Corepack initiative which we hope will make it easier to use Yarn (both 1 & 2) by removing the need to manually install them. > > <yarnpkg/yarn#8358 (comment)> There's not much need to be concerned with the latest version of 1.
fixes #10881 # fix from sh to bash `lib/bundlers.ts` actually uses not `sh` but `bash`, `bash` is a good way to test. # lock yarn version aws-lambda-nodejs have issue * [npm install -g yarn · Issue #6 · nodejs/corepack](nodejs/corepack#6) * [npm install yarn --global fails in docker container · Issue #8358 · yarnpkg/yarn](yarnpkg/yarn#8358) From issue comment, > For future reference, you can (should) pin your version rather than use whatever the latest is on npm (by using yarn@1.22.6, etc) - it's a good practice anyway regardless of the conditions, as you never know which bug could slip by us. You can also use the yarn-path setting to ensure that upgrades go through the appropriate review processes (including CI). > > <yarnpkg/yarn#8358 (comment)> So we'll follow it. And from issue comment, > Fwiw we don't plan to add any more features to Yarn 1, as all of our resources have shifted to Yarn 2. The past few commits have been aimed toward making the transition a bit easier, in particular thanks to the Corepack initiative which we hope will make it easier to use Yarn (both 1 & 2) by removing the need to manually install them. > > <yarnpkg/yarn#8358 (comment)> There's not much need to be concerned with the latest version of 1. # allow execute command for non root user `amazon/aws-sam-cli-build-image-nodejs12.x` don't have user that index is 1000. So create non root user. `/` in `amazon/aws-sam-cli-build-image-nodejs12.x` permission is `700`. change to allow execute command for non root user. I really don't want to change around the permissions, but I don't have a choice. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
# This is the 1st commit message: Add Identity Pool construct # This is the commit message #2: Bug fixes # This is the commit message #3: Bug fixes # This is the commit message #4: Formatting # This is the commit message #5: Add construct methods # This is the commit message #6: Remove flat # This is the commit message #7: Fix issues
Let's work backwards from how we want beta participants to use the CDK.
Installation
~/.cdk
. Ideally we don't want any system-level installs (including jsii-runtime), but as a temporary workaround until we bundle the runtime with the java client we can do with a installing jsii-runtime to/usr/local/bin
(requires sudo).~/.cdk/bin
to their PATH.Creating Projects
During beta we expect all CDK projects to be created using
cdk init
.We should have two types of templates for each supported language:
TypeScript
For example,
cdk init typescript-app
will initialize the current directory with a typescript CDK app project and then runnpm install
to bring in all the deps.The directory will include:
package.json
file withdevDependencies
which includes pointers tofile://
tarballs installed udner ~/.cdk. The package.json file will include all CDK modules (aws-cdk-xxx). This will make it easier for users to get started, and will also solve the issue of dependency resolution without npm.prepare
andwatch
scripts usetsc
(not jsii), since this is an app, also requirestsconfig.json
.cdk.json
has{ app: node index.js }
cdk
script will run the toolkitcdk
.prepare
script will also invokecdk synth -o cdk-out
or something like that. Which means that building the project will automatically synthesize the templates.Java
cdk init java-app
will initialize the current directory with a java maven project. Thepom.xml
file will use a system scope (or file:// repository, whichever makes more sense) to point toaws-cdk
andjsii-java-runtime
packages under~/.cdk
.The maven project will also include a post-build step that will invoke
synthesize
and will produce templates tocdk-out
(same name as the JS projects, to make it easier for CI/CD to be set up later).The text was updated successfully, but these errors were encountered: