You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2021/12/27 23:10:31 UTC
[lucenenet] branch master updated (015c537 -> 17ccff2)
This is an automated email from the ASF dual-hosted git repository.
nightowl888 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git.
from 015c537 Lucene.Net: Added embedded readme file for NuGet package
new fe4c0ff Directory.Build.props: Added SourceLink support and deterministic builds: https://github.com/dotnet/sourcelink/blob/main/README.md
new 17ccff2 website: Added source-stepping.md to describe how to allow the debugger to step into Lucene.NET code
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Directory.Build.props | 22 +++++++++++--
build/NuGet.props | 1 -
src/dotnet/docs/source-stepping.md | 65 ++++++++++++++++++++++++++++++++++++++
websites/apidocs/docfx.core.json | 8 ++++-
websites/apidocs/index.md | 9 +++---
5 files changed, 97 insertions(+), 8 deletions(-)
create mode 100644 src/dotnet/docs/source-stepping.md
[lucenenet] 01/02: Directory.Build.props: Added SourceLink support and deterministic builds: https://github.com/dotnet/sourcelink/blob/main/README.md
Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit fe4c0ffdfcaf35fc440f26d0b2e7cf014f1544e9
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Fri Dec 24 02:21:08 2021 +0700
Directory.Build.props: Added SourceLink support and deterministic builds: https://github.com/dotnet/sourcelink/blob/main/README.md
---
Directory.Build.props | 22 ++++++++++++++++++++--
build/NuGet.props | 1 -
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 532a8c6..8881ad5 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -22,7 +22,7 @@
<PropertyGroup>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
-
+
<!-- IMPORTANT: When these values are changed, the CI counter number should also be reset. -->
<PropertyGroup Label="Version of Builds">
<!-- IMPORTANT: VersionPrefix must always be the same as the Lucene version this is based on.
@@ -54,7 +54,7 @@
<!-- This is the new symbols format (the only one currently supported at NuGet.org) -->
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
-
+
<PropertyGroup Label="Copyright Info">
<Product>Lucene.Net</Product>
<Company>The Apache Software Foundation</Company>
@@ -65,6 +65,24 @@
<Copyright>Copyright © $(CopyrightYearRange) $(Company)</Copyright>
</PropertyGroup>
+ <PropertyGroup Label="SourceLink Settings: https://github.com/dotnet/sourcelink/blob/main/README.md">
+ <PublishRepositoryUrl>true</PublishRepositoryUrl>
+ <EmbedUntrackedSources>true</EmbedUntrackedSources>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(BUILD_REPOSITORY_PROVIDER)' == 'GitHub' Or '$(BUILD_REPOSITORY_PROVIDER)' == 'TfsGit' " Label="Deterministic builds: https://github.com/clairernovotny/DeterministicBuilds#readme">
+ <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
+ </PropertyGroup>
+
+ <!-- This is for testing only, we use SourceLink from any Azure DevOps git repo -->
+ <ItemGroup Condition=" '$(BUILD_REPOSITORY_PROVIDER)' == 'TfsGit' " Label="SourceLink Packages (experimental Azure Repos)">
+ <PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.1.1" PrivateAssets="All"/>
+ </ItemGroup>
+
+ <ItemGroup Condition=" '$(BUILD_REPOSITORY_PROVIDER)' == 'GitHub' " Label="SourceLink Packages (main repo)">
+ <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
+ </ItemGroup>
+
<!-- Settings to override the above Version of Builds. These can be used to
"freeze" the build number for a release, so whether building within
an IDE or from the commmand line, the version is always what is
diff --git a/build/NuGet.props b/build/NuGet.props
index b7c3e39..3eaf84a 100644
--- a/build/NuGet.props
+++ b/build/NuGet.props
@@ -23,7 +23,6 @@
<IsPackable>true</IsPackable>
<PackageTags>lucene.net;core;text;search;information;retrieval;lucene;apache;analysis;index;query</PackageTags>
<Authors>The Apache Software Foundation</Authors>
- <RepositoryUrl>https://github.com/apache/lucenenet</RepositoryUrl>
<PackageProjectUrl>https://lucenenet.apache.org</PackageProjectUrl>
<PackageIcon>lucene-net-icon-128x128.png</PackageIcon>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
[lucenenet] 02/02: website: Added source-stepping.md to describe how to allow the debugger to step into Lucene.NET code
Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit 17ccff2a971be5e025300b453b0f81608afdaa95
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Tue Dec 28 05:22:02 2021 +0700
website: Added source-stepping.md to describe how to allow the debugger to step into Lucene.NET code
---
src/dotnet/docs/source-stepping.md | 65 ++++++++++++++++++++++++++++++++++++++
websites/apidocs/docfx.core.json | 8 ++++-
websites/apidocs/index.md | 9 +++---
3 files changed, 77 insertions(+), 5 deletions(-)
diff --git a/src/dotnet/docs/source-stepping.md b/src/dotnet/docs/source-stepping.md
new file mode 100644
index 0000000..f7d8e1e
--- /dev/null
+++ b/src/dotnet/docs/source-stepping.md
@@ -0,0 +1,65 @@
+---
+title: How to step into source in the Visual Studio debugger
+uid: source-stepping
+summary: *content
+---
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+Debuggers can step into the source code, set breakpoints, watch variables, etc. It's easy to drop into Lucene.NET code any time you want to understand what's going on.
+
+If you're getting ready to report a bug in Lucene.NET, figuring out how to create a minimal repro is much easier since you aren't dealing with a black box!
+
+> [!NOTE]
+> This feature is enabled using [Source Link](https://github.com/dotnet/sourcelink#readme), which also has support for source stepping in [Visual Studio Code](https://devblogs.microsoft.com/dotnet/improving-debug-time-productivity-with-source-link/#visual-studio-code).
+
+As Source Link downloads files from the internet, Visual Studio has it disabled by default. Enabling it requires changing a few of the Visual Studio settings:
+
+1. Go to **Tools > Options > Debugging > Symbols** and ensure that the `NuGet.org Symbol Server` option is checked. It may also be a good idea to specify a cache directory once you have Source Link set up so Visual Studio won't need to repeatedly download the same source files each time you step into them.
+
+ 
+
+ > [!NOTE]
+ > If you are on .NET Framework, you'll also need to check the `Microsoft Symbol Servers` option.
+
+2. Disable `Just My Code` in **Tools > Options > Debugging > General** to allow Visual Studio to debug code outside of your solution. Also, verify that `Enable Source Link support` is enabled.
+
+ 
+
+ > [!NOTE]
+ > If you are on .NET Framework, you'll also need to check `Enable .NET Framework source stepping`.
+
+## Verifying Source Link
+
+1. To confirm Source Link is working, set a breakpoint before or on a line of code that calls a Lucene.NET type and start debugging the application.
+
+ 
+
+2. Step into the code, just as you would for any local method (F11 is the default keyboard shortcut). If all is configured correctly, you will be prompted to download the source code file for the type you are stepping into. Click on either `Download Source and Continue Debugging` option to continue.
+
+ 
+
+3. After a short pause, The debugger will step into the next line after your breakpoint inside the Lucene.NET source code.
+
+ 
+
+Congratulations! You can now step into Lucene.NET code to figure stuff out and to help put together a thorough bug report or PR.
+
+
+
+
diff --git a/websites/apidocs/docfx.core.json b/websites/apidocs/docfx.core.json
index 7d276f7..17f090e 100644
--- a/websites/apidocs/docfx.core.json
+++ b/websites/apidocs/docfx.core.json
@@ -34,13 +34,19 @@
"**.md"
],
"src": "obj/docfx/api/core"
- },
+ },
{
"files": [
"toc.yml",
"core/toc.yml"
],
"src": "toc"
+ },
+ {
+ "files": [
+ "source-stepping.md"
+ ],
+ "src": "../../src/dotnet/docs"
}
],
"overwrite": [
diff --git a/websites/apidocs/index.md b/websites/apidocs/index.md
index a72fdd3..1a198e5 100644
--- a/websites/apidocs/index.md
+++ b/websites/apidocs/index.md
@@ -1,6 +1,6 @@
---
-title: Lucene.Net Docs - The documentation website for Lucene.Net
-description: The documentation website for Lucene.Net
+title: Lucene.Net Docs - The documentation website for Lucene.NET
+description: The documentation website for Lucene.NET
---
Apache Lucene.Net <EnvVar:LuceneNetVersion> Documentation
@@ -8,7 +8,7 @@ Apache Lucene.Net <EnvVar:LuceneNetVersion> Documentation
---------------
-Lucene is a _.NET full-text search engine_. Lucene.NET is not a complete application,
+Lucene.NET is a _.NET full-text search engine_. Lucene.NET is not a complete application,
but rather a code library and API that can easily be used to add search capabilities
to applications.
@@ -32,7 +32,8 @@ on some of the conceptual or inner details of Lucene:
- [Changes](https://github.com/apache/lucenenet/releases/tag/<EnvVar:LuceneNetReleaseTag>): List of changes in this release.
<!-- - System Requirements: Minimum and supported .NET versions. LUCENENT TODO: Add link -->
- [Migration Guide](xref:Lucene.Net.Migration.Guide): What changed in Lucene 4; how to migrate code from Lucene 3.x.
-- [File Formats](xref:Lucene.Net.Codecs.Lucene46) : Guide to the supported index format used by Lucene. This can be customized by using [an alternate codec](xref:Lucene.Net.Codecs).
+- [Source Stepping](xref:source-stepping): How to use the Visual Studio debugger to step into Lucene.NET source code.
+- [File Formats](xref:Lucene.Net.Codecs.Lucene46): Guide to the supported index format used by Lucene. This can be customized by using [an alternate codec](xref:Lucene.Net.Codecs).
- [Search and Scoring in Lucene](xref:Lucene.Net.Search): Introduction to how Lucene scores documents.
- [Classic Scoring Formula](xref:Lucene.Net.Search.Similarities.TFIDFSimilarity): Formula of Lucene's classic [Vector Space](http://en.wikipedia.org/wiki/Vector_Space_Model) implementation. (look [here](xref:Lucene.Net.Search.Similarities) for other models)
- [Classic QueryParser Syntax](xref:Lucene.Net.QueryParsers.Classic): Overview of the Classic QueryParser's syntax and features.