amplify-swift icon indicating copy to clipboard operation
amplify-swift copied to clipboard

so many files “missing"

Open pixeled opened this issue 1 year ago • 5 comments

How did you install the Amplify CLI?

curl -sL https://aws-amplify.github.io/amplify-cli/install | bash && $SHELL

If applicable, what version of Node.js are you using?

n/a

Amplify CLI Version

12.10.1

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

no manual changes made

Describe the bug

after the amplify init and the amplify pull then creating the directory amplify/generated/models that fails to be created and then the amplify pull (which still fails to put anything in the models folder, the xCode project is modified to require a bunch of files that don’t exist

Showing All Messages
.../amplify/hooks/post-push.sh.sample: No such file or directory
.../amplify/hooks/pre-push.js.sample: No such file or directory

and puts in duplicate compile commands

Showing All Messages
Multiple commands produce ‘.../amplify-meta.json'
Multiple commands produce ‘.../root-cloudformation-stack.json'
Multiple commands produce ‘…/tags.json'

Expected behavior

modification of Xcode project should not make it uncompilable

Reproduction steps

amplify init
amplify pull
mkdir -p amplify/generated/models
amplify pull

(xcode project is tweaked)

Project Identifier

Project Identifier: b9f58993952c779454856d6c2fc263b7

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • [X] I have removed any sensitive information from my code snippets and submission.

pixeled avatar Jan 23 '24 00:01 pixeled

Hey @pixeled 👋 thanks for raising this!, it appears the codegen command maybe failing on the pull. I'm going to transfer this over to our codegen repository for better assistance 🙂.

ykethan avatar Jan 23 '24 19:01 ykethan

It appears that the issue is that the codegen step on amplify pull is happening even when the API category is not in use. Marking this as a bug.

dpilch avatar Feb 27 '24 20:02 dpilch

I also think this fix would take place in the CLI repo, but I'm not sure. It will require some investigation.

dpilch avatar Feb 27 '24 20:02 dpilch

This looks like an issue with the Amplify XCode helpers. The Amplify XCode helper assumes that the API category is in use.

https://github.com/aws-amplify/amplify-swift/blob/5ddf98c0ea6e2435d4be78a21c3f619a2f2a2eeb/AmplifyTools/AmplifyXcode/Sources/AmplifyXcodeCore/Commands/CommandImportModels.swift#L19

dpilch avatar Feb 27 '24 21:02 dpilch

@dpilch There is an open PR with the CLI team to fix this error. Would you be able to take look https://github.com/aws-amplify/amplify-cli/pull/13616 and probably merge it too..

harsh62 avatar Feb 27 '24 21:02 harsh62

The issue has been released. Please update amplify cli using amplify upgrade.

harsh62 avatar Apr 29 '24 13:04 harsh62

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Apr 29 '24 13:04 github-actions[bot]