Add polyglot exports for solr#1188
Merged
Merged
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1188Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1188" |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds polyglot export metadata for the Solr hosting integration so it can be consumed from generated app hosts (e.g., TypeScript), and introduces a TypeScript ValidationAppHost sample for the Solr package.
Changes:
- Annotate
SolrResourceand Solr builder extension methods with[AspireExport]for polyglot generation. - Add TypeScript
ValidationAppHostscaffolding (tsconfig/package files + apphost) forCommunityToolkit.Aspire.Hosting.Solr. - Minor formatting cleanup in the Solr C# files.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/CommunityToolkit.Aspire.Hosting.Solr/SolrResource.cs | Exports SolrResource (properties exposed) for polyglot consumption. |
| src/CommunityToolkit.Aspire.Hosting.Solr/SolrBuilderExtensions.cs | Exports Solr builder extension methods (add/config/volume/bind-mount) for polyglot usage. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Solr/ValidationAppHost/tsconfig.json | TypeScript compilation config for the ValidationAppHost. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Solr/ValidationAppHost/package.json | NPM scripts and dependencies for running/building the ValidationAppHost. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Solr/ValidationAppHost/package-lock.json | Locked dependency graph for reproducible installs. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Solr/ValidationAppHost/apphost.ts | Validation app host exercising exported Solr APIs from TypeScript. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Solr/ValidationAppHost/apphost.run.json | Aspire run profile configuration for the TypeScript app host. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Solr/ValidationAppHost/.aspire/settings.json | Aspire settings pointing at the TypeScript app host and package. |
Files not reviewed (1)
- playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Solr/ValidationAppHost/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
src/CommunityToolkit.Aspire.Hosting.Solr/SolrBuilderExtensions.cs:115
sourceis validated withArgumentNullException.ThrowIfNull, but an empty string is also invalid for a bind-mount path and will fail later at runtime. Consider usingArgumentException.ThrowIfNullOrEmpty(source)(or equivalent) to fail fast and keep validation consistent withWithConfigset, which already rejects empty paths.
[AspireExport("withDataBindMount", Description = "Adds a bind mount for the Solr data folder")]
public static IResourceBuilder<SolrResource> WithDataBindMount(this IResourceBuilder<SolrResource> builder, string source, bool isReadOnly = false)
{
ArgumentNullException.ThrowIfNull(builder);
ArgumentNullException.ThrowIfNull(source);
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+3
to
5
| #pragma warning disable ASPIREATS001 // AspireExport is experimental | ||
|
|
||
| namespace Aspire.Hosting.ApplicationModel; |
Comment on lines
+5
to
7
| #pragma warning disable ASPIREATS001 // AspireExport is experimental | ||
|
|
||
| namespace Aspire.Hosting; |
| await bindMountedSolr.coreName.set(bindCoreName); | ||
| await bindMountedSolr.withDataBindMount(dataDirectory); | ||
|
|
||
| if (false) { |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
6f6be53 to
87eed1b
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Minimum allowed line rate is |
aaronpowell
added a commit
that referenced
this pull request
Apr 1, 2026
Squash merge of #1188 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds AspireExport coverage and a matching TypeScript validation apphost for solr.