You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
motivation: address broken validation when using relative path in remote
depednencies
changes:
* simply to have a single API that encapsulated all the mapping use
cases
* introduce intermediate MappablePackageDependency model to converge the
various implementations
* simplify the mapping logic to better address realtive paths
* add and adjust tests
rdar://100823575
// FIXME: This case should really also be handled by `mappedDependency()` but that is currently impossible because `sanitizeDependencyLocation()` relies on the fact that we're calling it with an incorrect (file-system) `packageKind` for SCM-based dependencies, so we have no ability to distinguish between actual file-system dependencies and SCM-based ones without introducing some secondary package kind or other flag to pick the different behaviors. That seemed much worse than having this extra code path be here and `DefaultIdentityResolver.sanitizeDependencyLocation()` being public, but it should eventually be cleaned up. It seems to me as if that will mostly be a case of fixing the test suite to not rely on these fairly arbitrary behaviors.
if case .fileSystem(_,let path)= dependency.kind {
194
177
throwManifestParseError.invalidManifestFormat("'\(path)' is not a valid path for path-based dependencies; use relative or absolute path instead.", diagnosticFile:nil, compilerCommandLine:nil)
0 commit comments