Skip to content

Update BuildFlags.buildDirectoryFromWorkspacePath method for scratch-path#2032

Merged
plemarquand merged 2 commits intoswiftlang:mainfrom
kartikangiras:scratchpath
Feb 6, 2026
Merged

Update BuildFlags.buildDirectoryFromWorkspacePath method for scratch-path#2032
plemarquand merged 2 commits intoswiftlang:mainfrom
kartikangiras:scratchpath

Conversation

@kartikangiras
Copy link
Contributor

@kartikangiras kartikangiras commented Jan 11, 2026

Description

  • Add extract(scratchpath()) method to detect scratch-path and buildpath args.
  • Update buildDirectoryFromWorkspacePath method with appropriate precedence.
  • Add test cases which pass succsefully for the following code change.

Fixes: #2022

Tasks

  • Required tests have been written
  • Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

@plemarquand
Copy link
Contributor

Looks great! Just one comment about validation since we've had issues reported in he past where users have misconfigured arguments, and they're often hard to track down unless we guard against it defensively.

@kartikangiras
Copy link
Contributor Author

Looks great! Just one comment about validation since we've had issues reported in he past where users have misconfigured arguments, and they're often hard to track down unless we guard against it defensively.

@plemarquand I have added the necessary validations which were mentioned.

Copy link
Contributor

@plemarquand plemarquand left a comment

Choose a reason for hiding this comment

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

Thanks for this! Sorry for the delay, we needed to fix a Windows CI issue and I had to rebase to fix a merge conflict.

@plemarquand plemarquand merged commit 3da65ac into swiftlang:main Feb 6, 2026
21 checks passed
@kartikangiras kartikangiras deleted the scratchpath branch February 6, 2026 18:09
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.

BuildFlags.buildDirectoryFromWorkspacePath hardcodes .build instead of using the --scratch-path if set

2 participants