blimmer / cdk-datadog-integration

Amazon Cloud Development Kit (CDK) logic to integrate your AWS account with Datadog
Apache License 2.0
19 stars 8 forks source link

fix: restore the build #30

Closed blimmer closed 3 years ago

blimmer commented 3 years ago

In #23, we significantly loosened the peer dependencies to just state > v1 for CDK. That started causing the build to fail (see #29).

I played around with this locally and it looks like IStackSynthesizer must be defined (which was introduced with CDK v1.39.0).

If you use anything less (like 1.38.0), the dotnet build fails with this message:

#STDOUT>
#STDOUT>   Determining projects to restore...
#STDOUT>   Restored /private/var/folders/fc/7sgvwtb17vzg9ry_tmc2r_7w0000gn/T/npm-pack2F7Nzz/BenLimmer.CdkDatadogIntegration/BenLimmer.CdkDatadogIntegration.csproj (in 2.22 sec).
#STDOUT> /private/var/folders/fc/7sgvwtb17vzg9ry_tmc2r_7w0000gn/T/npm-pack2F7Nzz/BenLimmer.CdkDatadogIntegration/BenLimmer/CdkDatadogIntegration/DatadogIntegrationStackConfig.cs(281,27): error CS0234: The type or namespace name 'IStackSynthesizer' does not exist in the namespace 'Amazon.CDK' (are you missing an assembly reference?) [/private/var/folders/fc/7sgvwtb17vzg9ry_tmc2r_7w0000gn/T/npm-pack2F7Nzz/BenLimmer.CdkDatadogIntegration/BenLimmer.CdkDatadogIntegration.csproj]
#STDOUT> /private/var/folders/fc/7sgvwtb17vzg9ry_tmc2r_7w0000gn/T/npm-pack2F7Nzz/BenLimmer.CdkDatadogIntegration/BenLimmer/CdkDatadogIntegration/DatadogIntegrationStackConfigProxy.cs(270,27): error CS0234: The type or namespace name 'IStackSynthesizer' does not exist in the namespace 'Amazon.CDK' (are you missing an assembly reference?) [/private/var/folders/fc/7sgvwtb17vzg9ry_tmc2r_7w0000gn/T/npm-pack2F7Nzz/BenLimmer.CdkDatadogIntegration/BenLimmer.CdkDatadogIntegration.csproj]
#STDOUT>
#STDOUT> Build FAILED.

Therefore, it looks like we need to state AT LEAST v1.39.0, which should still fix @plumdog's need for 1.55.0 to work.

I also added a build step to branch CI to try to prevent this from happening in main in the future.

Fixes #29