aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.98k stars 1.06k forks source link

Fix awsmigrationhub build error #2714

Closed LilyWangLL closed 11 months ago

LilyWangLL commented 1 year ago

Issue #, if available:

Description of changes: Change project AWSMigrationHub name from aws-cpp-sdk-AWSMigrationHub to aws-cpp-sdk-awsmigrationhub, fix build error:

CMake Error at cmake/dependencies.cmake:16 (get_target_property):
  get_target_property() called with non-existent target
  "aws-cpp-sdk-awsmigrationhub".
Call Stack (most recent call first):
  cmake/dependencies.cmake:73 (compute_links)
  cmake/sdks.cmake:288 (sort_links)
  CMakeLists.txt:328 (add_sdks)

CMake Error at cmake/dependencies.cmake:84 (get_target_property):
  get_target_property() called with non-existent target
  "aws-cpp-sdk-awsmigrationhub".
Call Stack (most recent call first):
  cmake/sdks.cmake:288 (sort_links)
  CMakeLists.txt:328 (add_sdks)

I'm not sure if the directory name of the project aws-cpp-sdk-AWSMigrationHub also needs to be changed to lowercase. Can you help confirm? cc @sdavtaker

Check all that applies:

Check which platforms you have built SDK on to verify the correctness of this PR.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

dg0yt commented 1 year ago

~I think the bug is in the vcpkg port.~ This sub-project is really inconsistent with regard to its siblings.

sbiscigl commented 11 months ago

So with regard to how things are named and why inconsistencies exist, everything in the directory generated is generated by our model codegen. When i say "model" that is every single aws service provides us with a model file and we use those to auto generate the directory names and class names.

aws migration hub specifically can be found here

and in there we can see "targetPrefix":"AWSMigrationHub", which is why this is named the way it is. So if it were to change anywhere it would change here.

We however do not own this configuration and it is owned by the migration hub service and is provided to us. We try not to make one-off code generation changes because we then have to support a specific service by service customization going forward. We also cant change the name of this currently because people may already rely on it and changing it would create a backward incompatible change.

With the concern of backwards compatibility breakage, and the fact the model comes from upstream i'm against changing this to support a branching model of how we handle the name of the directory. That said I do understand why the inconsistency is not fun.

closing the PR but if you want to talk more about how code gen effects the names of things feel free to re-open and reply.

dg0yt commented 11 months ago

I think the bug is in the vcpkg port.

Now I can confirm that this is a vcpkg bug.