Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

convert/gem/ruby: Don't overwrite existing melange files #1680

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

justinvreeland
Copy link
Contributor

No description provided.

@justinvreeland justinvreeland marked this pull request as ready for review December 9, 2024 15:05
Copy link
Member

@luhring luhring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this fixing a bug? If so, is this something we could add a test for?

@justinvreeland
Copy link
Contributor Author

Is this fixing a bug? If so, is this something we could add a test for?

I consider it a bug. If you run melange convert gem X in Wolfi it should not overwrite the existing files you already have. This exists in python already though I didn't notice a matching test.

I suppose the test would just be to find a gem that has a dependency, writing an empty file to the current directory for that dependency and then running convert to make sure the empty file is not overwritten. Would this go in e2e_tests?

@luhring
Copy link
Member

luhring commented Dec 9, 2024

I suppose the test would just be to find a gem that has a dependency, writing an empty file to the current directory for that dependency and then running convert to make sure the empty file is not overwritten.

Yeah sounds good!

Would this go in e2e_tests?

I think we could scope the test down to just calling findDependencies (or its caller) using the Go testing framework. The "e2e" tests using bash to do larger scale operations, and I don't think we need all that here.

@justinvreeland justinvreeland force-pushed the jvreeland/ruby-no-overwrite branch 2 times, most recently from 8a27488 to 7b5e82b Compare December 11, 2024 17:30
@justinvreeland justinvreeland force-pushed the jvreeland/ruby-no-overwrite branch from 7b5e82b to 5deed14 Compare December 11, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants