carton icon indicating copy to clipboard operation
carton copied to clipboard

A dependency fails to have its resources copied by `carton bundle`

Open MaxDesiatov opened this issue 3 years ago • 1 comments

A dependency with a resource fails to have its resources copied by carton bundle. I've updated the linked repository to show the problem.

This is the output of carton bundle:

Bundle
├── TopLevelResource.md
├── c78bdf2c8a889c8f.wasm
├── c9143f6becf19317.js
├── index.html
└── swift-wasm-resource-bug_swift-wasm-resource-bug.resources
    └── TopLevelResource.md

I see two potential issues:

  1. TopLevelResource.md appears twice. Once at the root, and once in a resource directory for the module. The specific resource directory seems more correct, as there could be name collisions across modules.
  2. Resource.md from the SubPackageWithResource package is missing entirely.

Originally posted by @fcanas in https://github.com/swiftwasm/swift/issues/2568#issuecomment-766252433

MaxDesiatov avatar Jan 24 '21 10:01 MaxDesiatov

A repository for reproduction is available here https://github.com/fcanas/swift-wasm-resource-bug/

MaxDesiatov avatar Jan 30 '21 19:01 MaxDesiatov