You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2022/01/18 14:58:33 UTC
[GitHub] [lucenenet] NightOwl888 opened a new pull request #603: Upgraded build tools for LuceneDocsPlugins and moved docs/website build to windows-latest (fixes #601)
NightOwl888 opened a new pull request #603:
URL: https://github.com/apache/lucenenet/pull/603
Fixes #601.
- Upgraded `LuceneDocsPlugins.csproj` to use new .csproj format
- Upgraded `docs.ps1` to use `dotnet publish` rather than NuGet restore and MSBuild
- Upgraded Azure Pipelines to use `windows-latest` instead of `vs2017-win2016` for docs and website
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] NightOwl888 edited a comment on pull request #603: Upgraded build tools for LuceneDocsPlugins and moved docs/website build to windows-latest (fixes #601)
Posted by GitBox <gi...@apache.org>.
NightOwl888 edited a comment on pull request #603:
URL: https://github.com/apache/lucenenet/pull/603#issuecomment-1017171189
> I can confirm that the sln and cproj open and build. When I run the docs build however, I now get this warning
>
> ```
> [22-01-19 10:16:40.609]Warning:[ExtractMetadata](Z:/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'Z:\src\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj' with message: C:\Program Files\dotnet\sdk\5.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets: (241, 5): Package J2N, version 2.0.0-beta-0016 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
> [22-01-19 10:16:41.353]Warning:[ExtractMetadata](Z:/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'Z:\src\Lucene.Net\Lucene.Net.csproj' with message: C:\Program Files\dotnet\sdk\5.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets: (241, 5): Package J2N, version 2.0.0-beta-0016 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
>
>
> Build succeeded with warning.
> [22-01-19 10:17:04.629]Warning:[ExtractMetadata](Z:/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'Z:\src\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj' with message: C:\Program Files\dotnet\sdk\5.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets: (241, 5): Package J2N, version 2.0.0-beta-0016 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
> [22-01-19 10:17:04.630]Warning:[ExtractMetadata](Z:/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'Z:\src\Lucene.Net\Lucene.Net.csproj' with message: C:\Program Files\dotnet\sdk\5.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets: (241, 5): Package J2N, version 2.0.0-beta-0016 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
> 2 Warning(s)
> 0 Error(s)
> ```
>
> I've mapped a network drive to this location to reduce the path length in case that was the cause but this hasn't resolved the warning. Have you seen this warning before (perhaps not caused by this PR)?
I can't think of a reason why J2N 2.0.0-beta-0016 cannot resolve. However, do note that the current version is 2.0.0. Given that fact, I suspect there might be a problem with not having all of the changes on your local system (although I am not sure how that could happen).
I was able to get a successful docs build on Azure DevOps: https://dev.azure.com/lucene-net-temp2/Lucene.NET/_build/results?buildId=846&view=results (although, it looks like the build needs to be fixed to update the PackageVersion env variable).
The `build` folder (where `dependencies.props` resides) had to be renamed `.build` to resolve a name conflict when building on Linux. Make sure you have that folder, and that you have cleaned out any remnants of the `build` folder.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] NightOwl888 commented on pull request #603: Upgraded build tools for LuceneDocsPlugins and moved docs/website build to windows-latest (fixes #601)
Posted by GitBox <gi...@apache.org>.
NightOwl888 commented on pull request #603:
URL: https://github.com/apache/lucenenet/pull/603#issuecomment-1017188292
> Also, based on your comments in #601 it seems like we need to update the docs.ps1 and site.ps1 files to ensure we are using at least docfx 2.59 ? That can be done by modifying the lines where we issue a `Invoke-WebRequest` but we should probably just store the docfx version in these files as a variable to be used.
According to https://github.com/dotnet/docfx/issues/5553#issuecomment-591275853, 2.58 should be high enough, but we could upgrade if this isn't resolved another way.
All of the dependency versions are in `dependencies.props`. Since it is unlikely we will ever need to make the version conditional, the simple solution is to parse the XML from that file to get the version number from a new property that contains it. Simply add a new PropertyGroup, as follows.
```xml
<PropertyGroup Label="Tool Versions">
<DocFxVersion>2.58</DocFxVersion>
</PropertyGroup>
```
I didn't migrate the package reference versions for ` LuceneDocsPlugins.csproj` to `dependencies.props` in this PR, but perhaps that should be done, as well. `dependencies.props` is [imported in the root Directory.Build.targets file](https://github.com/NightOwl888/lucenenet/blob/fix/GH-601-docs-build/Directory.Build.targets#L23), so it is automatically added to every project.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] Shazwazza commented on pull request #603: Upgraded build tools for LuceneDocsPlugins and moved docs/website build to windows-latest (fixes #601)
Posted by GitBox <gi...@apache.org>.
Shazwazza commented on pull request #603:
URL: https://github.com/apache/lucenenet/pull/603#issuecomment-1016944232
Looks like we'll also need some assembly binding updates since the docs build eventually fails with
```
[22-01-19 10:50:44.322]Error:System.IO.FileLoadException: Could not load file or assembly 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at LuceneDocsPlugins.LuceneDfmEngineCustomizer.Customize(DfmEngineBuilder builder, IReadOnlyDictionary`2 parameters)
at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.DfmService..ctor(DfmServiceProvider provider, String baseDir, String templateDir, ICompositionContainer container, ImmutableDictionary`2 tokens, IReadOnlyList`1 fallbackFolders, IReadOnlyDictionary`2 parameters)
at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.CreateMarkdownService(MarkdownServiceParameters parameters)
at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.BuildCore(DocumentBuildParameters parameters)
at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.Build(DocumentBuildParameters parameters)
at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.BuildCore(DocumentBuildParameters parameter, IMarkdownServiceProvider markdownServiceProvider, BuildInfo currentBuildInfo, BuildInfo lastBuildInfo)
at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.Build(IList`1 parameters, String outputDirectory)
at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument(BuildJsonConfig config, TemplateManager templateManager, String baseDirectory, String outputDirectory, String pluginDirectory, String templateDirectory)
at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Build failed.
[22-01-19 10:50:44.381]Error:System.IO.FileLoadException: Could not load file or assembly 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at LuceneDocsPlugins.LuceneDfmEngineCustomizer.Customize(DfmEngineBuilder builder, IReadOnlyDictionary`2 parameters)
at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.DfmService..ctor(DfmServiceProvider provider, String baseDir, String templateDir, ICompositionContainer container, ImmutableDictionary`2 tokens, IReadOnlyList`1 fallbackFolders, IReadOnlyDictionary`2 parameters)
at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.CreateMarkdownService(MarkdownServiceParameters parameters)
at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.BuildCore(DocumentBuildParameters parameters)
at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.Build(DocumentBuildParameters parameters)
at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.BuildCore(DocumentBuildParameters parameter, IMarkdownServiceProvider markdownServiceProvider, BuildInfo currentBuildInfo, BuildInfo lastBuildInfo)
at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.Build(IList`1 parameters, String outputDirectory)
at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument(BuildJsonConfig config, TemplateManager templateManager, String baseDirectory, String outputDirectory, String pluginDirectory, String templateDirectory)
at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] NightOwl888 commented on pull request #603: Upgraded build tools for LuceneDocsPlugins and moved docs/website build to windows-latest (fixes #601)
Posted by GitBox <gi...@apache.org>.
NightOwl888 commented on pull request #603:
URL: https://github.com/apache/lucenenet/pull/603#issuecomment-1017194327
> Looks like we'll also need some assembly binding updates since the docs build eventually fails with
>
> ```
> [22-01-19 10:50:44.322]Error:System.IO.FileLoadException: Could not load file or assembly 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
> File name: 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
> at LuceneDocsPlugins.LuceneDfmEngineCustomizer.Customize(DfmEngineBuilder builder, IReadOnlyDictionary`2 parameters)
> at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.DfmService..ctor(DfmServiceProvider provider, String baseDir, String templateDir, ICompositionContainer container, ImmutableDictionary`2 tokens, IReadOnlyList`1 fallbackFolders, IReadOnlyDictionary`2 parameters)
> at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.CreateMarkdownService(MarkdownServiceParameters parameters)
> at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.BuildCore(DocumentBuildParameters parameters)
> at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.Build(DocumentBuildParameters parameters)
> at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.BuildCore(DocumentBuildParameters parameter, IMarkdownServiceProvider markdownServiceProvider, BuildInfo currentBuildInfo, BuildInfo lastBuildInfo)
> at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.Build(IList`1 parameters, String outputDirectory)
> at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument(BuildJsonConfig config, TemplateManager templateManager, String baseDirectory, String outputDirectory, String pluginDirectory, String templateDirectory)
> at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument()
>
> WRN: Assembly binding logging is turned OFF.
> To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
> Note: There is some performance penalty associated with assembly bind failure logging.
> To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
>
>
>
> Build failed.
> [22-01-19 10:50:44.381]Error:System.IO.FileLoadException: Could not load file or assembly 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
> File name: 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
> at LuceneDocsPlugins.LuceneDfmEngineCustomizer.Customize(DfmEngineBuilder builder, IReadOnlyDictionary`2 parameters)
> at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.DfmService..ctor(DfmServiceProvider provider, String baseDir, String templateDir, ICompositionContainer container, ImmutableDictionary`2 tokens, IReadOnlyList`1 fallbackFolders, IReadOnlyDictionary`2 parameters)
> at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.CreateMarkdownService(MarkdownServiceParameters parameters)
> at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.BuildCore(DocumentBuildParameters parameters)
> at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.Build(DocumentBuildParameters parameters)
> at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.BuildCore(DocumentBuildParameters parameter, IMarkdownServiceProvider markdownServiceProvider, BuildInfo currentBuildInfo, BuildInfo lastBuildInfo)
> at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.Build(IList`1 parameters, String outputDirectory)
> at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument(BuildJsonConfig config, TemplateManager templateManager, String baseDirectory, String outputDirectory, String pluginDirectory, String templateDirectory)
> at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument()
>
> WRN: Assembly binding logging is turned OFF.
> To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
> Note: There is some performance penalty associated with assembly bind failure logging.
> To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
> ```
Well, I suspect there is something going on with your clone not being fully updated. Some things you could try:
1. Run [git clean](https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-use-the-git-clean-command)
2. Clone the repo directly from the [PR branch](https://github.com/NightOwl888/lucenenet/blob/fix/GH-601-docs-build)
3. Upgrade the .NET SDK to [6.0.101](https://dotnet.microsoft.com/en-us/download/dotnet/6.0).
We probably don't need the binding redirects, but if we do, one way to resolve them is to add a package reference to the updated version of `System.Collections.Immutable` to `LuceneDocsPlugins.csproj`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] NightOwl888 merged pull request #603: Upgraded build tools for LuceneDocsPlugins and moved docs/website build to windows-latest (fixes #601)
Posted by GitBox <gi...@apache.org>.
NightOwl888 merged pull request #603:
URL: https://github.com/apache/lucenenet/pull/603
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] Shazwazza commented on pull request #603: Upgraded build tools for LuceneDocsPlugins and moved docs/website build to windows-latest (fixes #601)
Posted by GitBox <gi...@apache.org>.
Shazwazza commented on pull request #603:
URL: https://github.com/apache/lucenenet/pull/603#issuecomment-1016926760
Also, based on your comments in https://github.com/apache/lucenenet/issues/601 it seems like we need to update the docs.ps1 and site.ps1 files to ensure we are using at least docfx 2.59 ? That can be done by modifying the lines where we issue a `Invoke-WebRequest` but we should probably just store the docfx version in these files as a variable to be used.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] NightOwl888 commented on pull request #603: Upgraded build tools for LuceneDocsPlugins and moved docs/website build to windows-latest (fixes #601)
Posted by GitBox <gi...@apache.org>.
NightOwl888 commented on pull request #603:
URL: https://github.com/apache/lucenenet/pull/603#issuecomment-1017171189
> I can confirm that the sln and cproj open and build. When I run the docs build however, I now get this warning
>
> ```
> [22-01-19 10:16:40.609]Warning:[ExtractMetadata](Z:/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'Z:\src\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj' with message: C:\Program Files\dotnet\sdk\5.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets: (241, 5): Package J2N, version 2.0.0-beta-0016 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
> [22-01-19 10:16:41.353]Warning:[ExtractMetadata](Z:/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'Z:\src\Lucene.Net\Lucene.Net.csproj' with message: C:\Program Files\dotnet\sdk\5.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets: (241, 5): Package J2N, version 2.0.0-beta-0016 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
>
>
> Build succeeded with warning.
> [22-01-19 10:17:04.629]Warning:[ExtractMetadata](Z:/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'Z:\src\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj' with message: C:\Program Files\dotnet\sdk\5.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets: (241, 5): Package J2N, version 2.0.0-beta-0016 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
> [22-01-19 10:17:04.630]Warning:[ExtractMetadata](Z:/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'Z:\src\Lucene.Net\Lucene.Net.csproj' with message: C:\Program Files\dotnet\sdk\5.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets: (241, 5): Package J2N, version 2.0.0-beta-0016 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
> 2 Warning(s)
> 0 Error(s)
> ```
>
> I've mapped a network drive to this location to reduce the path length in case that was the cause but this hasn't resolved the warning. Have you seen this warning before (perhaps not caused by this PR)?
I can't think of a reason why J2N 2.0.0-beta-0016 cannot resolve. However, do note that the current version is 2.0.0. Given that fact, I suspect there might be a problem with not having all of the changes on your local system (although I am not sure how that could happen).
I was able to get a successful docs build on Azure DevOps: https://dev.azure.com/lucene-net-temp2/Lucene.NET/_build/results?buildId=846&view=results (although, it looks like the build needs to be fixed to update the PackageVersion env variable).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org