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

Clean USVFS namespace #64

Merged
merged 4 commits into from
Jun 9, 2024
Merged

Clean USVFS namespace #64

merged 4 commits into from
Jun 9, 2024

Conversation

Holt59
Copy link
Member

@Holt59 Holt59 commented Jun 8, 2024

  • Remove deprecated functions.
  • Prefix all exposed USVFS function as usvfsXXX.

@Al12rs
Copy link
Member

Al12rs commented Jun 8, 2024

What is the reason for prefixing the public functions with usvfs?
I assume it helped for debugging or what specifically?

Mostly ask for posterity

@Twinki14
Copy link

Twinki14 commented Jun 9, 2024

It makes sense from my perspective seeing that usvfs is first and foremost a library with many public functions, the prefix would:

  • Help distinguish library-specific calls vs whatever runtime is using the library at a glance
  • Keep usvfs from limiting certain function method names, eg now I could implement a ClearVirtualMappings in my app that uses usvfsClearVirtualMappings inside it (I'm sure you could still do that with macro-fu, but the prefix makes it easier)
  • Help contributing developers distinguish what's public and what's internal in usvfs at glance

In my view the biggest benefit to the prefix is an overall way cleaner library, to both work on and consume

@Holt59
Copy link
Member Author

Holt59 commented Jun 9, 2024

What is the reason for prefixing the public functions with usvfs? I assume it helped for debugging or what specifically?

Mostly ask for posterity

As @Twinki14 said It's just to have something cleaner and more consistent:

  • since all methods are declared in the global namespace, the usvfs prefix avoid clash issues and makes it clear were the method comes from - from some methods such as ClearVirtualMapping, it is kind of obvious based on context, but for others it is not (at least for me), e.g., GetLogMessages, PrintDebugInfo or CreateProcessHooked,
  • there were some discrepancies between methods since some used usvfs prefix (e.g., usvfsConnect), so this fixes it.

@Holt59 Holt59 merged commit ba053c7 into master Jun 9, 2024
9 checks passed
@Holt59 Holt59 deleted the dev/clean-usvfs branch June 16, 2024 11:45
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.

3 participants