Commit 3e6e5e3
Fix makePathRelative using wrong base path when projectDirectory differs (#1608)
* Fix makePathRelative using wrong base path when projectDirectory differs (#1606)
`makePathRelative` used `project.basePath` to compute parent paths, while
`resolveGroupPath` used `projectDirectory ?? project.basePath`. When these
differ (e.g. via --project flag), intermediate group paths become inconsistent,
causing Xcode to resolve files to the wrong location.
Regression from #1596 which added the `makePathRelative` call in the
`createIntermediateGroups` code path.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Extract basePath computed property in SourceGenerator
Consolidates `projectDirectory ?? project.basePath` into a single
`basePath` property to prevent future mismatches between path resolution
call sites.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 90dfa9d commit 3e6e5e3
2 files changed
Lines changed: 43 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
42 | | - | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| |||
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
65 | | - | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
886 | 892 | | |
887 | 893 | | |
888 | 894 | | |
889 | | - | |
| 895 | + | |
890 | 896 | | |
891 | 897 | | |
892 | 898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
911 | 911 | | |
912 | 912 | | |
913 | 913 | | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
914 | 948 | | |
915 | 949 | | |
916 | 950 | | |
| |||
0 commit comments