Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error if carthage cache and rome cache have a file and directory with the same name #261

Open
kpriemchenko opened this issue Jun 22, 2023 · 0 comments

Comments

@kpriemchenko
Copy link

kpriemchenko commented Jun 22, 2023

Bug Report

Rome terminates with the error if local Carthage cache contains a file, but a cached framework in Rome contains a folder with the same name (case 1).
And vice versa, if local cache contains a folder, but framework has a file with the same name (case 2).

Steps which reproduce the bug

  1. Build version 1 of a framework with a file abc.nib and upload the framework to a Rome cache
  2. Build version 2 of a framework with a folder abc.nib and upload the framework to a Rome cache
  3. Have version 1 of a framework in local carthage/build folder
  4. Try to run rome download command

Current behavior

There is an error and Rome terminates with exit code 1:
case 1:

Downloaded FrameworkName from: path/to/framework/framework_name-version.zip
rome: path/to/framework/FrameworkName.framework/abc.nib: openBinaryFile: inappropriate type (Is a directory)

case 2:

Downloaded FrameworkName from: path/to/framework/framework_name-version.zip
rome: path/to/framework/FrameworkName.framework/abc.nib: createDirectory: already exists (File exists)

Suggested behavior

Rome successfully updates the file/folder in local cache and continues execution.

Why would the enhancement be useful to most users

This error probably corresponds to a rare use case. My situation was that Rome is integrated in a CI/CD process run on several servers. These servers also have Carthage/Build folder cached. Several pipelines were running simultaneously, but they used different versions of a framework. And in this framework there was a change between versions and instead of a folder there was a file with the same name.

I mitigated the error by excluding that specific framework from Rome cache, but I'd like a more permanent solution.

This error was probably a cause for this issue (#215).
Cleaning the cache in my case (shared carthage cache between CI servers) could work until someone uses older version of framework again.

Rome version:

0.24.0.65

OS and version:

MacOS 13.4
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant