Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure BuildOptions can configure the output directory instead of forcing inline rendering #9986

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rmannibucau
Copy link
Contributor

No description provided.

@rmannibucau
Copy link
Contributor Author

@dotnet-policy-service agree

Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.86%. Comparing base (fe673ec) to head (f89ff73).
Report is 191 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9986      +/-   ##
==========================================
+ Coverage   74.31%   78.86%   +4.54%     
==========================================
  Files         536      540       +4     
  Lines       23189    23468     +279     
  Branches     4056     4065       +9     
==========================================
+ Hits        17234    18508    +1274     
+ Misses       4853     3820    -1033     
- Partials     1102     1140      +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@filzrev
Copy link
Contributor

filzrev commented Jun 4, 2024

BuildJsonConfig has Output property that can be used to change output directory by setting this property.

/// <summary>
/// Defines the output folder of the generated build files.
/// Command line --output argument override this value.
/// </summary>
[JsonProperty("output")]
[JsonPropertyName("output")]
public string Output { get; set; }

Is there any missing features that can not be covered above solution?


Note:
There is following behavior differences. So it might need to explicitly set full path.

  • When using BuildJsonConfig's Output property. relative path is resolved based on docfx.json config path.
  • When using outputDirectory parameter. It's resolved based on current directory.

@rmannibucau
Copy link
Contributor Author

Hi

One issue is the configuration is internal so programmatically it would require to generate a json file, I'd prefer something closer to docfx project api if possible.

@filzrev
Copy link
Contributor

filzrev commented Jun 8, 2024

One issue is the configuration is internal

I've forgotten that BuildJsonConfig can't access programmatically because it's declared as internal.
I've requested to change these options to public before at #8872.
But currently there is no progress.

As a temporary workaround.
By using IgnoresAccessChecksToGenerator.
It can use RunBuild.Exec method directly instead of Docset.Build API.

Example configs of csproj

  <ItemGroup>
    <PackageReference Include="IgnoresAccessChecksToGenerator" Version="0.7.0" PrivateAssets="All" />
    <InternalsAssemblyName Include="Docfx.App" />
    <InternalsAssemblyName Include="Docfx.Dotnet" />
  </ItemGroup>

@rmannibucau
Copy link
Contributor Author

@filzrev it would work but does it make sense to not expose what doxfx project uses or should docfx not use this output param anymore then?

@rmannibucau
Copy link
Contributor Author

guess we can drop this PR is #10010 will reach main repo anytime soon, wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants