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

[Bug] "cwd" in docfx.json (in metadata src element) is broken in 2.71.1 #9311

Closed
jskeet opened this issue Oct 19, 2023 · 2 comments
Closed
Labels
bug A bug to fix

Comments

@jskeet
Copy link

jskeet commented Oct 19, 2023

Describe the bug

This is a regression in 2.71.1. When a source is specified in the docfx.json metadata using "cwd", the specified file is not found.

To Reproduce
Steps to reproduce the behavior (see the zip file as an alternative to doing all of this by hand):

CwdIssue.zip

  • Create a "Src" directory with a C# project (in its own directory) under it
  • Create a docfx.json file which specifies the C# project relative to Src, using a cwd of "Src"
  • Run "dotnet docfx metadata" and see the warnings below, with no output
Using .NET Core SDK 6.0.415
No files are found with glob pattern SampleLibrary/SampleLibrary.csproj, excluding <none>, under directory "C:\Users\jonskeet\Issues\docfx\CwdIssue"
warning: No .NET API project detected.
Creating output...
warning: No .NET API detected for .


Build succeeded with warning.

    2 warning(s)
    0 error(s)

Expected behavior

Appropriate metadata generated

Context (please complete the following information):

  • OS: Windows
  • Docfx version: 2.71.1

Additional context

The exact same example works fine in 2.71.0.

Looking through the file history, it looks like this commit was to blame. Changing

The commit was labelled as a refactor, but deleted a property - that's not refactoring. Additionally, this change was not mentioned in the release notes (and IMO should never have happened in a patch release even if it had been

As a side note: docfx is the dependency I dread upgrading more than any other due to things like this. I really appreciate the tool - but I'm frustrated by the amount of time I've spent over the years changing my build process to deal with breaking changes :(

@yufeih
Copy link
Contributor

yufeih commented Oct 19, 2023

Apologies for the regression in 2.71.1. As a temporary solution, would it be ok to change cwd to src in your docfx.json? Thanks for your input and indeed we need a better change management.

@jskeet
Copy link
Author

jskeet commented Oct 19, 2023

I'll need to find out all the places we generate docfx.json (it's a complex project) - but I'll probably try to do that.

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

No branches or pull requests

2 participants