Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(init): remove automatic JSII Roslyn analyzer dependency (#4835)
We want to automatically add a dependency on JSII's Roslyn analyzers (in the "Amazon.JSII.Analyzers" package) for .NET users that run `cdk init`. However, right now the "JSII.Analyzers" package depends on "JSII.Runtime", and so in order to end up with the right version of "Runtime" in the set of dependencies, users must have the same version of "Analyzers" in their project. This means a couple of things: - First off, when generating a project template, it's hard for the CDK CLI to know the JSII version libraries have been generated with. It needs to map a version number like `1.15.0` (CDK) to 0.19.0 (JSII). - Right now we're using a "*" which causes issues as soon as a new JSII version is released. - Even if we took a shot at the right JSII version (by recording the "current JSII" version at CLI build time), there is a window of inconsistency (between merging a new JSII and releasing CDK) where for 'cdk init' for .NET is going to fail on developer workstations. - If customers migrate to a newer CDK version, they must figure out the version of JSII and then manually update their Analyzers dependency to match. Until we've figured out how to deal with this issue, we're taking out the dependency.
- Loading branch information