Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Remove miq-unicode dependency, encode manually #6

Closed
wants to merge 1 commit into from
Closed

Remove miq-unicode dependency, encode manually #6

wants to merge 1 commit into from

Conversation

djberg96
Copy link
Contributor

Part of the gems-pending cleanup effort. Since there are only a handful of references, I simply replaced them with the longhand version.

Note that I didn't use .dup here since they're already substrings (or in one case, a constant assignment).

Followup to ManageIQ/manageiq-smartstate#149

@Fryguy
Copy link
Member

Fryguy commented Jan 22, 2021

There is a module for utility methods, where the method might be more appropriate - https://github.com/ManageIQ/virtfs-ntfs/blob/master/lib/virtfs/ntfs/utils.rb

I kind of like the code saying "UnicodeToUtf8", because it's clearer, so I think creating utility method in NTFS Utils is a better approach for readability.

@djberg96
Copy link
Contributor Author

@Fryguy Ok, updated.

@@ -1,5 +1,3 @@
require 'util/miq-unicode'
Copy link
Member

@Fryguy Fryguy Jan 22, 2021

Choose a reason for hiding this comment

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

Not sure, but you might need a require 'fs/ntfs/utils' here like is done in the other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Fryguy Actually, where is this coming from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Fryguy It looks to me like this library assumed manageiq-smartstate was a dependency, but it's not marked as such, and that's a different utils.rb file anyway.

Copy link
Member

Choose a reason for hiding this comment

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

oh very interesting...I missed that detail

Copy link
Member

@Fryguy Fryguy Jan 22, 2021

Choose a reason for hiding this comment

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

The virtfs code was expected to be extracted from manageiq-smartstate. In fact, I'd expect you to run into duplicated code. Note that a lot of this code doesn't actually work yet, and was in progress, but has since been abandoned. It is not used at all by the application.

On that note, I think we should abandon this virtfs stuff for now (like completely abandon, archive the repos) @chessbyte

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Fryguy I'm all in favor of archiving this if it's not actually being used.

Copy link
Member

Choose a reason for hiding this comment

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

Seeing as these virt* repos have not been active for awhile and just cause noise (needless PRs and Issues) due to gem and cop conflicts, let's archive them for now. If someone wants to work on them in earnest, we can always un-archive them. /cc @roliveri

lib/virtfs/ntfs/utils.rb Outdated Show resolved Hide resolved
lib/virtfs/ntfs/utils.rb Outdated Show resolved Hide resolved
Put method into Utils module, use that.

Add AsciiToUtf8 method to Utils and use it.

Remove pointless utf8 conversion.

Co-authored-by: Jason Frey <[email protected]>

Remove AsciiToUtf8, not going to use it after all.
@Fryguy Fryguy self-assigned this Jan 22, 2021
@Fryguy Fryguy closed this Jan 25, 2021
@Fryguy
Copy link
Member

Fryguy commented Jan 25, 2021

Closing since we are archiving

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants