-
Notifications
You must be signed in to change notification settings - Fork 641
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
API Work - Stabilization #203
Conversation
@NightOwl888 I apologise for the delayed response to your NUnit tests. I've been working on another project. Is there anything I can help with? My current tasks for Lucene.NET that I would want to merge into this PR are: Icu-dotnet
|
I also apologize for the delayed response.
Yes, there is. I have been working on cleaning the API up and making it more .NET-like. CLS CompliancePart of this process is making the whole project CLS compliant, so it can be consumed by VB and other .NET languages.
I reverted the ThaiAnalyzer back to its previous state and adapted the ICUBreakIterator to work with it - seems to work pretty well, for now (and it is now CLS Compliant). Let me know if/when you have a rule-based break iterator so I can ensure compatibility. CollationAlso, I ended up marking the Collation-related types CLSCompliant(false). I am now pretty much convinced that there is no way we can get them working with icu-dotnet, based on this documentation. It also seems to indicate that the collation functionality in the Analysis.ICU package is better (and it is based on ICU 4J, so it should work). Anyway, my thought is to add Test FrameworkI also reverted the changes to OLD_FORMAT_IMPERSONATION_IS_ACTIVE and made it static again. There really doesn't seem to be a reasonable way to ensure this flag is read from everywhere if it is non-static. This fixed more than a dozen failing tests. I am working on finishing up the Codec functionality now - specifically the randomizing of codecs and the IgnoreCodecs functionality. But, I could use some help. The test framework has been a major source of test failures. Many parts of it were not translated correctly or are still unfinished. IMO, the test framework should be reviewed line-by-line to ensure that the equivalent functionality is implemented. Documentation CommentsAlso, as I mentioned above, some of the documentation comments need to be finished. Mostly, they are malformed so they don't show up in Visual Studio, but there is also some documentation that is either incorrect or has not been brought over from Lucene. |
…ause they have been replaced by the Collections.GetHashCode() and Collections.Equals() functionality
…to be more like the original JDK version, including the ability to build the hash code based on the values of the nested value if it is a collection
… more like the original JDK version, including the ability to test equality based on the values of the nested value if it is a collection
…a reference type, we use Collections.Equals() and Collections.GetHashCode() so its values are compared if it happens to be a collection" This reverts commit d48493d.
…ollections.GetHashCode() on reference types
…ock to enumerator in GetHashCode()
… and GetHashCode() methods (that in Java were inherited from AbstractSet<T>)
…with System.IO.DirectoryNotFoundException.
…oryNotFoundException catch clauses
…ails randomly and when it does it causes an index out of range exception when building the message, so the message has been commented for the time being
…for debugging purposes
…on to the exceptions to be checked for
…otFoundException to the random errors that are thrown
…st projects and fixed all exception classes to actually be serializable
…ene.Net.Search.TestSort.config (old .NET remoting configurations)
…et and added Icu4c.Win.Full.Lib dependency for .NET 4.5.1"
…ourceLoader: Changed test to write the embedded resource to a known location rather than being dependent on an external file that may/may not be in the file system.
When do you expect the merge to happen? And will it have x64 support? |
The merge will be happening soon. @synhershko, do you need to review this before merging, or can the review be done after? I am ready to merge when you are. As for x64 support, I believe we do have it now that we have switched from ICU4NET to icu-dotnet, but @conniey might be able to answer that for sure. Also, the ICU-specific functionality has been moved to its own package so the majority of users don't need to deal with that dependency anymore. |
Excellent. I notice that the .xml files are still not in the nuget packages, so no api docs? |
Nope, there is still a lot of broken XML in the documentation comments (see above) that are preventing the process from being complete. It would take a single person the better part of a week to correct this - it would sure be nice if others participated. But now that you mention it, I could probably turn the option to produce the XML on for all but the 2 incomplete packages at least. BTW - I am legally obligated to tell you (thanks to Apache) that those packages are not for production release. |
@davhdavh - I have now added the XML documentation to the packages. |
…reverted back to .NET Standard 1.5
A small bug in the port in |
…8ToString() does not throw an exception on invalid text.
@davhdavh - thanks for the report. I was wondering about that piece of code, but since none of the tests were complaining I left it alone. Thanks for complaining in their place. This is just another place where someone deviated from the original code that happened to be the wrong choice (as usually is the case). |
Thanks for all the quick fixes :) I found two more issues. 1. The assemblies are not strong-named in either debug or release build. 2. The assembly version is 4.0.0.0. I believe the right thing to do would be to set |
After trying to get strong names on, I can say that the entire build system is broken on latest version of dotnet sdk. 1. Restore needs a specific sln, since there are two, ie:
and yet with those fixes, I still cant get it working. |
Per Itamar (the project manager), Lucene.Net will not be strong-named going forward. I don't agree with all of his points, but for now I am just going to see how many people complain. I did strong-name the
In case we do strong-name because of popular demand, setting the assembly version to 4.0.0.0 is the right way to go. This is what the MVC team did - all versions of MVC 4 were 4.0.0.0 (until a they found a security vulnerability so severe that they had to force everyone to upgrade to it, then it incremented to 4.0.0.1). If you read the SemVer document, the behavior of strong-naming acts exactly like changing the major version, since whenever it is changed it breaks binary compatibility. Therefore, it should never change unless the major version is changed.
If you look at the I made an attempt to unify to one solution and upgrade to
These issues can probably be overcome and I much prefer the new format, but I didn't want to delay the release any longer. I think it would be best to wait until Microsoft announces they are feature-complete and NUnit Test Adapter has .NET Core support rather than trading one broken build system for another. I wouldn't object if you want to contribute a build option to turn on strong-naming (provided it doesn't break the build in TeamCity). But keep in mind, many of the assemblies are using |
This is a branch of #191 and supersedes that pull request. To build this branch, see the instructions on #191.
The plan is to work on the API here to keep from releasing several successive releases with breaking API changes. Once the API is relatively stable, we can merge to master and create a release that can be consumed without having to worry about so many breaking API changes between releases.
API Polishing
This fixes several API issues that were making Lucene.Net deviate from looking like a normal .NET application - mainly by using properties and methods the way that are specified in the MSDN guidelines and following .NET naming conventions for properties, methods, fields, parameters, and types. Also several types are being renamed and/or moved to address naming collisions, incorrect porting corrected, bugs fixed, and other issues such as CLS compliance are being addressed.
These specific changes are being made that make Lucene.Net differ from Lucene because they are framework conventions that are different between Java and .NET:
Size()
changed toCount
orLength
propertyComparator
changed toComparer
on all classes, interfaces , properties, methods, documentation and comments.SetLongValue(long)
, we will have.SetInt64Value()
. NOTE: This isn't done yet. I could use some advice on if or how this one should be done, sinceWriteVInt64()
admittedly looks odd. The class and interface names are being changed to match. In certain special cases, type names are being changed to differentiate "Single" (the datatype) from "Singular" (meaning one) because there are types in the same context that use both, and it would be confusing.Status
This branch is now more stable than master.
The Test Framework is now randomizing Codec, InfoStream, Time Zone, and Culture (the same as Lucene). This has revealed many new issues, most of which have now been addressed. There are now no tests failing constantly, and a few that fail randomly.
Key:
LUCENENET TODO|LUCENE TO-DO
using the regular expression option to find them)Tests
Do note that currently this branch has more failing tests than master. In fact, the test suite is currently crashing for several tests, making the whole thing bomb before it can finish. Right now, the priority is finishing the API changes before addressing these problems.
However, if you would like to help out by debugging the failing tests, please fork this branch and submit the pull request back here. Due to the fast changing state of the API, please fix one bug at a time and submit the pull request to this branch (not master) ASAP.
Documentation Comments
Also up-for-grabs is to complete the documentation comments in the following sections:
While it is assumed that the documentation comments for the other projects are finished, they could probably all use a review.
The automated Java converter brought much of the comment structure over, however some comments have been left behind in Lucene, and they need to be formatted and corrected to match MSDN's guidelines. Some common issues that need to be addressed:
seealso
tosee
(seealso
are for the links that go at the bottom of the documentation page, not the direct links within the content).{@code paramName}
or<code>paramName</code> need to be changed to
. Note that not all of the "code" are parameter names, and the normal case need to be in
tags for single line and
` tags for multiline code examples. Do note the code also needs to be converted to match our API.
{@link TypeName}
need to be changed to the appropriate<see cref="TypeName"/>
or anchor tag (if external).TypeName
to<see cref="TypeName"/>
).Pull requests should be directed to this branch (not master).