-
Notifications
You must be signed in to change notification settings - Fork 30
Add package client to fhir package resolver #189
Add package client to fhir package resolver #189
Conversation
…true_not_false_or_empty' into feature/1987-add-package-client-to-resolver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments
string? cache_folder = localCache ? scopePath : null; | ||
var cache = new DiskPackageCache(cache_folder); | ||
var project = new FolderProject(scopePath); | ||
#pragma warning disable CS8604 // Possible null reference argument. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning can be removed, because the constructor of PackageContext
can handle null
for the server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only in a newer version of the NuGet package, which hasn't been published, since it's still waiting for review.
var scopePath = getScopePath(); | ||
var scope = await createContext(scopePath, client: null); | ||
|
||
foreach (var path in paths) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This foreach would better fit in the createContext
I think.
throw new FileNotFoundException($"Could not resolve all dependencies. Missing: {missingDeps}."); | ||
} | ||
} | ||
//install packages from local machine | ||
if (filePaths is not null && filePaths.Any()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To eliminate the if
clause, you can also do this:
foreach (var path in filePaths ?? Enumerable.Empty<string>())
fixes #1987