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

Use forward slashes for package configuration #1893

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

glopesdev
Copy link
Member

The local environment .config file has relied so far on OS-specific path strings to determine assembly locations and native library folders. However, because of this it is currently not possible to version .config files across platforms, e.g. Windows and Linux, since the direction of slashes is different.

This PR normalizes config file manipulations to prefer Unix paths for all package install, update and removal operations. To allow for the greatest backwards compatibility as well as OS-specific path strings passed through the CLI interface, the behavior of the PackageConfiguration and ConfigurationHelper classes was not modified. Instead, normalization was implemented via the PackageConfigurationUpdater, which is responsible for actually manipulating the serializable representation of the .config file.

When initializing the updater object, all existing paths are normalized to Unix forward slashes, and any further modifications are then performed and persisted using forward slash path separators.

Fixes #1864

@glopesdev glopesdev added the fix Pull request that fixes an issue label Jul 8, 2024
@glopesdev glopesdev added this to the 2.8.4 milestone Jul 8, 2024
@PathogenDavid
Copy link
Member

Also glad to see the eradication of System.Tuple usage :)

Copy link
Member

@PathogenDavid PathogenDavid left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull request that fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Environment config files are not compatible across platforms
2 participants