Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions playground/python/Python.AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma warning disable ASPIREHOSTINGPYTHON001 // Test for experimental feature

var builder = DistributedApplication.CreateBuilder(args);

builder.AddPythonApp("script-only", "../script_only", "main.py");
Expand Down
6 changes: 6 additions & 0 deletions src/Aspire.Hosting.Python/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;

[assembly: Experimental("ASPIREHOSTINGPYTHON001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we get https://learn.microsoft.com/en-us/dotnet/aspire/diagnostics/overview#ASPIREHOSTINGPYTHON001 to be a valid URL?

cc @IEvangelist

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ASPIREHOSTINGPYTHON001 has to either be a heading, or you can use an inline named HTML element:

<span name="ASPIREHOSTINGPYTHON001"></span>

Then the bookmark will work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IEvangelist when I create the doc I use a heading, same as the other sections, but the generated id is lower-cased so the current link doesn't work. I will add the this way there is no change to do in aspire, but it's unfortunate. Maybe the doc generator could also inject a name with the actual case of the heading (though that would leak everywhere).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's a dotnet/docfx concern more than anything else. Bookmarks in URLs just look better in lowercase in my opinion, but knowing that they're always in lowercase, why not just have this code ensure that they're lowercase?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, had I known I would have done it before. But I don't want to block release/9.0 insertion on that. Will do it in main once 9.0 has shipped and is merged back.

9 changes: 0 additions & 9 deletions src/Aspire.Hosting.Python/Directory.Build.props

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

<PropertyGroup>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<NoWarn>
$(NoWarn);
ASPIREHOSTINGPYTHON001;
</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down