Skip to content

Transition Path to FilePath #363

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

swiftlysingh
Copy link
Member

@swiftlysingh swiftlysingh commented Mar 29, 2025

This pull request refactors the Path struct within Sources/SWBUtil/Path.swift to exclusively use the FilePath type for internal path representation and manipulation.

The legacy implementation toggle has been removed as part of this change. Note that some tests are currently failing due to behavioural differences after the FilePath migration. Should the FilePath implementation be adjusted to align with the expected test behaviours?

Feedback is appreciated. Relates to issue #23.

@owenv
Copy link
Collaborator

owenv commented Mar 29, 2025

The legacy implementation toggle has been removed as part of this change. Note that some tests are currently failing due to behavioural differences after the FilePath migration. Should the FilePath implementation be adjusted to align with the expected test behaviours?

I think we'll need to look at the test failures on a case by case basis to make sure we're not unintentionally breaking compatibility with existing projects, but overall the implementation changes here lgtm. I'll kickoff CI so we can get an idea of where we might need to take a closer look for possible behavior changes

@owenv
Copy link
Collaborator

owenv commented Mar 29, 2025

@swift-ci please test

@owenv
Copy link
Collaborator

owenv commented Mar 31, 2025

based on the test output here it looks like there might be a lingering issue with path normalization:

✘ Test operators() recorded an issue at MacroEvaluationTests.swift:339:9: Expectation failed: (scope.evaluate(namespace.parseString("$(NON_STANDARD_REL_PATH:standardizepath)")) → "bar/baz") == "foo/../bar/baz"

@swiftlysingh
Copy link
Member Author

@swift-ci please test

@swiftlysingh swiftlysingh force-pushed the task/removes-useLegacyImplementation-#23 branch from af8548a to 22871e1 Compare April 17, 2025 01:18
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