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

docfx 2.70.0 #138314

Merged
merged 2 commits into from
Aug 4, 2023
Merged

docfx 2.70.0 #138314

merged 2 commits into from
Aug 4, 2023

Conversation

osalbahr
Copy link
Contributor

@osalbahr osalbahr commented Aug 2, 2023

Created by brew bump


Created with brew bump-formula-pr.

release notes

Docfx as .NET Foundation Project

Starting from v2.70.0, docfx has been fully transitioned to be a .NET Foundation project entirely driven by the community for the interest of the community.

Given the ownership change, we are renaming the NuGet package names, assembly names and namespace names from Microsoft.DocAsCode.* to Docfx.*.

What's Changed

💥 Breaking Changes

🎉 New Features

🐞 Bug Fixes

🔧 Engineering

📄 Documentation

New Contributors

Full Changelog: dotnet/docfx@v2.67.5...v2.70.0

@github-actions github-actions bot added bump-formula-pr PR was created using `brew bump-formula-pr` dotnet .NET use is a significant feature of the PR or issue labels Aug 2, 2023
@osalbahr
Copy link
Contributor Author

osalbahr commented Aug 2, 2023

$ HOMEBREW_NO_INSTALL_FROM_API=1 brew install docfx
docfx 2.63.0 is already installed but outdated (so it will be upgraded).
==> Fetching docfx
==> Downloading https://ghcr.io/v2/homebrew/core/docfx/manifests/2.70.0
curl: (22) The requested URL returned error: 404

Error: docfx: Failed to download resource "docfx_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/docfx/manifests/2.70.0
$ HOMEBREW_NO_INSTALL_FROM_API=1 brew install docfx -v
docfx 2.63.0 is already installed but outdated (so it will be upgraded).
==> Fetching docfx
==> Downloading https://ghcr.io/v2/homebrew/core/docfx/manifests/2.70.0
/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.1.3-23-gd2863d0\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 13.5\)\ curl/8.1.2 --header Accept-Language:\ en --fail --retry 3 --header Accept:\ application/vnd.oci.image.index.v1\+json --header Authorization:\ Bearer\ QQ== --remote-time --output /Users/dracula/Library/Caches/Homebrew/downloads/02f6a242d205a524f05e2ba2e731490f09b96852a777b0d73ded532612d51ae8--docfx-2.70.0.bottle_manifest.json.incomplete --location https://ghcr.io/v2/homebrew/core/docfx/manifests/2.70.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0    70    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
Error: docfx: Failed to download resource "docfx_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/docfx/manifests/2.70.0

I don't understand where it's getting the manifest url from.

@chenrui333
Copy link
Member

chenrui333 commented Aug 2, 2023

$ HOMEBREW_NO_INSTALL_FROM_API=1 brew install docfx
docfx 2.63.0 is already installed but outdated (so it will be upgraded).
==> Fetching docfx
==> Downloading https://ghcr.io/v2/homebrew/core/docfx/manifests/2.70.0
curl: (22) The requested URL returned error: 404

Error: docfx: Failed to download resource "docfx_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/docfx/manifests/2.70.0
$ HOMEBREW_NO_INSTALL_FROM_API=1 brew install docfx -v
docfx 2.63.0 is already installed but outdated (so it will be upgraded).
==> Fetching docfx
==> Downloading https://ghcr.io/v2/homebrew/core/docfx/manifests/2.70.0
/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.1.3-23-gd2863d0\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 13.5\)\ curl/8.1.2 --header Accept-Language:\ en --fail --retry 3 --header Accept:\ application/vnd.oci.image.index.v1\+json --header Authorization:\ Bearer\ QQ== --remote-time --output /Users/dracula/Library/Caches/Homebrew/downloads/02f6a242d205a524f05e2ba2e731490f09b96852a777b0d73ded532612d51ae8--docfx-2.70.0.bottle_manifest.json.incomplete --location https://ghcr.io/v2/homebrew/core/docfx/manifests/2.70.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0    70    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
Error: docfx: Failed to download resource "docfx_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/docfx/manifests/2.70.0

I don't understand where it's getting the manifest url from.

you need to do brew instal -s xxx (to install from source)

@chenrui333
Copy link
Member

docfx needs dotnet 8, so it wont be buildable as of now.

@chenrui333 chenrui333 added the build failure CI fails while building the software label Aug 2, 2023
@osalbahr
Copy link
Contributor Author

osalbahr commented Aug 2, 2023

you need to do brew instal -s xxx (to install from source)

Oh. Yeah I overlooked that, my b.

docfx needs dotnet 8, so it wont be buildable as of now.

Works on my end. I don't know if this is an issue only in macOS 11-arm-64.

$ HOMEBREW_NO_INSTALL_FROM_API=1 brew install -s docfx
docfx 2.63.0 is already installed but outdated (so it will be upgraded).
==> Fetching docfx
==> Downloading https://github.com/dotnet/docfx/archive/refs/tags/v2.70.0.tar.gz
Already downloaded: /Users/dracula/Library/Caches/Homebrew/downloads/a36ad492f253f3ca2049c1b0c65f7dc6595a8e576c2737e62236a0a52709e930--docfx-2.70.0.tar.gz
==> Upgrading docfx
  2.63.0 -> 2.70.0 

==> dotnet publish src/docfx --configuration Release --framework net7.0 --output
🍺  /usr/local/Cellar/docfx/2.70.0: 96 files, 34MB, built in 46 seconds
==> Running `brew cleanup docfx`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /usr/local/Cellar/docfx/2.63.0... (189 files, 44.3MB)
Removing: /Users/dracula/Library/Caches/Homebrew/docfx--2.63.0... (15.4MB)
$ brew test docfx
==> Testing docfx
==> /usr/local/Cellar/docfx/2.70.0/bin/docfx init -q
$ brew config
HOMEBREW_VERSION: 4.1.3-23-gd2863d0
ORIGIN: https://github.com/Homebrew/brew
HEAD: d2863d05b33177626e66fd4be75e92bcc3f14c99
Last commit: 6 hours ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 9cc0f9120963af86205b2547f385b2be5f48554d
Core tap last commit: 2 hours ago
Core tap branch: bump-docfx-2.70.0
Core tap JSON: 02 Aug 13:33 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: quad-core 64-bit kabylake
Clang: 14.0.3 build 1403
Git: 2.41.0 => /usr/local/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 13.5-x86_64
CLT: 14.3.1.0.1.1683849156
Xcode: N/A

@chenrui333
Copy link
Member

/opt/homebrew/Cellar/dotnet/7.0.100/libexec/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/private/tmp/docfx-20230802-74229-osmsm4/docfx-2.70.0/src/docfx/docfx.csproj::TargetFramework=net8.0]

this is on the CI

@osalbahr
Copy link
Contributor Author

osalbahr commented Aug 2, 2023

/opt/homebrew/Cellar/dotnet/7.0.100/libexec/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/private/tmp/docfx-20230802-74229-osmsm4/docfx-2.70.0/src/docfx/docfx.csproj::TargetFramework=net8.0]

this is on the CI

Do you know why this error might happen only on the CI?

@chenrui333
Copy link
Member

actually you are right, it looks like it only happens on ci. 🤔

@chenrui333 chenrui333 added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Aug 3, 2023
@osalbahr
Copy link
Contributor Author

osalbahr commented Aug 3, 2023

actually you are right, it looks like it only happens on ci. 🤔

Yeah, it’s odd. Does it pass locally for you too?

@chenrui333
Copy link
Member

yeah, passed in my local as well, this is my full build log, https://gist.github.com/chenrui333/f5cf7fc2246402d2f081032a50e8791d

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Aug 3, 2023
@chenrui333
Copy link
Member

well, that did not quite work.

@chenrui333
Copy link
Member

@shawnfunke can you help take a look at this build? Thanks!

@shawnfunke
Copy link
Contributor

The reason this fails is because this runs inside of GitHub Actions. In that case it'll add .NET 8 as a additional target framework. Here it uses TargetFrameworks instead of TargetFramework so using the arguments in the code below fixes the above issue.

    <ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
    <TargetFrameworks>net6.0;net7.0</TargetFrameworks>
    <TargetFrameworks Condition=" '$(ContinuousIntegrationBuild)' == 'true' ">$(TargetFrameworks);net8.0</TargetFrameworks>

https://github.com/dotnet/docfx/blob/fc7deda119eebd830a2d37882698dcbaedaec24b/Directory.Build.props#L3-L5

    # specify the target framework to only target the currently used version of
    # .NET, otherwise additional frameworks will be added due to this running
    # inside of GitHub Actions, for details see:
    # https://github.com/dotnet/docfx/blob/fc7deda119eebd830a2d37882698dcbaedaec24b/Directory.Build.props#L3-L5
    args = %W[
      --configuration Release
      --framework net#{dotnet.version.major_minor}
      --output #{libexec}
      --runtime #{os}-#{arch}
      --no-self-contained
      -p:Version=#{version}
      -p:TargetFrameworks=net#{dotnet.version.major_minor}
    ]

@chenrui333
Copy link
Member

ah, I see, that makes sense.

specify TargetFramework

Signed-off-by: Rui Chen <[email protected]>

docfx: specify TargetFrameworks

Signed-off-by: Rui Chen <[email protected]>
@chenrui333
Copy link
Member

Thanks @shawnfunke!

@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Aug 3, 2023
@chenrui333 chenrui333 removed the build failure CI fails while building the software label Aug 3, 2023
@shawnfunke
Copy link
Contributor

@chenrui333 no problem, feel free to ask at anytime. I wonder if GITHUB_ACTIONS should be set to true by default when using brew install --build-from-source to prevent these kind of issues. What do you think @chenrui333 @MikeMcQuaid?

@chenrui333
Copy link
Member

chenrui333 commented Aug 3, 2023

@chenrui333 no problem, feel free to ask at anytime. I wonder if GITHUB_ACTIONS should be set to true by default when using brew install --build-from-source to prevent these kind of issues. What do you think @chenrui333 @MikeMcQuaid?

looks like it is indeed used pretty extensively by dotnet community, https://grep.app/search?q=GITHUB_ACTIONS&filter[path.pattern][0]=Directory.Build.props (but we dont have many dotnet formulae yet though), for now, I would say just override via dotnet build option. Once we have more, we can update test-bot for this.

@MikeMcQuaid
Copy link
Member

@chenrui333 no problem, feel free to ask at anytime. I wonder if GITHUB_ACTIONS should be set to true by default when using brew install --build-from-source to prevent these kind of issues. What do you think @chenrui333 @MikeMcQuaid?

That seems very odd. Upstream should provide a better toggle than GITHUB_ACTIONS for this behaviour change.

@shawnfunke
Copy link
Contributor

shawnfunke commented Aug 3, 2023

@chenrui333 no problem, feel free to ask at anytime. I wonder if GITHUB_ACTIONS should be set to true by default when using brew install --build-from-source to prevent these kind of issues. What do you think @chenrui333 @MikeMcQuaid?

That seems very odd. Upstream should provide a better toggle than GITHUB_ACTIONS for this behaviour change.

Usually the GITHUB_ACTIONS environment variable is used to toggle the ContinuousIntegrationBuild MSBuild setting. In this case they also use it to extend their targeted frameworks so they build and publish it for all supported framework versions.

The idea behind setting GITHUB_ACTIONS to true being, that when someone is creating or updating formulae locally that they will be affected by these kind of behaviour changes directly. This could probably happen to non .NET projects as well, that is where that suggestion came from.

@MikeMcQuaid
Copy link
Member

My suggestion would be the opposite: we should not pass through that variable through to builds implicitly. ENV.delete("GITHUB_ACTIONS") would fix for now and can add to Homebrew/brew to remove properly later.

@shawnfunke
Copy link
Contributor

My suggestion would be the opposite: we should not pass through that variable through to builds implicitly. ENV.delete("GITHUB_ACTIONS") would fix for now and can add to Homebrew/brew to remove properly later.

There's already another workaround being used for this build that will do the job for now.

Sure the other way around works as well. I am not sure where to start with making this change as I'm not to familiar with the code base of Brew itself. I would guess that it would be here: Library/Homebrew/upgrade.rb#L184. I do not foresee this breaking many, if any formulae. Doing a quick code search I only see one usage in a test so it should probably be removed there as well, that seems to be implemented here.

@chenrui333 chenrui333 added the ready to merge PR can be merged once CI is green label Aug 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Aug 4, 2023
@BrewTestBot BrewTestBot enabled auto-merge August 4, 2023 04:46
@BrewTestBot BrewTestBot added this pull request to the merge queue Aug 4, 2023
Merged via the queue into Homebrew:master with commit 44a33d8 Aug 4, 2023
@chenrui333
Copy link
Member

the build option with TargetFrameworks is pretty robust for now (we can revisit the GITHUB_ACTIONS usage later if needed :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. dotnet .NET use is a significant feature of the PR or issue ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants