Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

Add package client to fhir package resolver #189

Conversation

mmsmits
Copy link
Member

@mmsmits mmsmits commented Feb 28, 2022

fixes #1987

…true_not_false_or_empty' into feature/1987-add-package-client-to-resolver
Copy link
Member

@marcovisserFurore marcovisserFurore left a 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.
Copy link
Member

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.

Copy link
Member Author

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)
Copy link
Member

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())
Copy link
Member

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>())

@marcovisserFurore marcovisserFurore merged commit 8fa6fc7 into release/4.0.0-beta2 Mar 1, 2022
@marcovisserFurore marcovisserFurore deleted the feature/1987-add-package-client-to-resolver branch March 1, 2022 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants