Age | Commit message (Collapse) | Author |
|
|
|
|
|
Resolves #53
|
|
|
|
Resolves #49. Additionally, enabled optimizations in release mode.
|
|
|
|
|
|
This full resolves #44 as it also uses the correct member formatter for member comparisons
|
|
|
|
Since VB.NET can explicitly implement a member without using the same
naming convention as you might use in C#, it was causing some issues with
mdoc matching xml member nodes to reflected types. In particular, the cases
supported with this patch are:
- interface type and member name concatenated. e.g. `IListAdd`
- same as above, but when the interface doesn’t match the interface where the member is defined. e.g. `ICollection` inherits `IEnumerable`. So `System.Collections.IEnumerable.GetEnumerator` is expressed in some types as `ICollectionGetEnumerator`
- same name as the interface member e.g. `Microsoft.VisualBasic.Compability.VB6.BaseControlArray$System.ComponentModel.ISupportInitialize.BeginInit`
Related #44
|
|
This fixes an issue where an extension method in multiple frameworks might have a slightly different signature,
due to a different parameter name, resulting in an InvalidOperationException because a duplicate extension
was added to the index file.
Additionally, this improves robustness of assembly search paths.
Related to to #27.
|
|
|
|
|
|
When a type overrides a member in one framework, but does not in another framework
processed after the first, the Member node was being removed, even though the entry
remained in teh first framework index file. This Resolves #39
|
|
If a framework has a different inheritance chain, another `Base/BaseTypeName`
element will be added with a `FrameworkAlternate` attribute.
Resolves #16
|
|
Fixes #32, which was an issue with the ascii null character. It caused the resulting XML to be
malformed.
|
|
A MemberGroup can be intermixed amongst the other Member nodes.
It will be sorted to be in front of the other similarly named Members.
It must contain a MemberName attribute, and can have: Docs, and AssemblyInfo nodes.
Resolves #35
|
|
mdoc now supports documenting multiple frameworks. You can use this new functionality by passing the path to a configuration file in the `-frameworks` (or `-fx` for short) parameter.
```
mdoc update -o path/to/documentationXML -frameworks path/to/frameworks.xml
```
This command will result in one XML file per framework in the `path/to/documentationXML/FrameworksIndex` folder.
``` xml
<?xml version="1.0" encoding="utf-8"?>
<Framework Name="Two">
<Namespace Name="MyFramework.MyOtherNamespace">
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">
<Member Id="M:MyFramework.MyOtherNamespace.MyOtherClass.#ctor" />
...
</Type>
</Namespace>
</Framework>
```
Configuration File
This is a sample configuration file:
``` xml
<?xml version="1.0" encoding="utf-8"?>
<Frameworks>
<Framework Name="One" Source="One">
<assemblySearchPath>dependencies/One</assemblySearchPath>
</Framework>
<Framework Name="Two" Source="Two">
<assemblySearchPath>dependencies/Two</assemblySearchPath>
</Framework>
</Frameworks>
```
Note that the `assemblySearchPath` is meant to house dependent assemblies that mono.cecil must be able to resolve. You can have as many as you need for each framework if you happen to have them separated into multiple folders. Also the `-L` parameter applies globally to every framework.
Frameworks Config Bootstrap
To simplify the tedium of creating the configuration file, a simple command was added that will use the folder structure to create a basic configuration file:
``` csharp
mdoc fx-bootstrap path/to/frameworks
```
This will create a file at `path/to/frameworks/frameworks.xml`, using the folders in `path/to/frameworks` as the names/paths
DocId Signatures
You can now pass a flag to add a `DocId` signature to every `Type` and `Member` node.
```
mdoc update -o out/path some.dll -use-docid
```
_please note_: framework index files will _always_ use the DocId as their identifiers.
Frameworks Index files Grouped by Namespace
Framework index files now have types grouped by namespace. Example:
``` xml
<?xml version="1.0" encoding="utf-8"?>
<Framework Name="Two">
<Namespace Name="MyFramework.MyOtherNamespace">
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">
<Member Id="M:MyFramework.MyOtherNamespace.MyOtherClass.#ctor" />
...
</Type>
</Namespace>
</Framework>
```
Bug Fixes and Enhancements
- Resolves #13
- Resolves #27
- Resolves #31
- Resolves #33
|
|
These files were inadvertently left out of PRs that were merged to master
|
|
Resolves #12
|
|
Closes #6
|
|
In some cases, for example when running in "frameworks" mode (ie. https://github.com/mono/api-doc-tools/pull/18), you might have non-managed .dlls in the directory. This change allows mdoc to simply write the fact that it couldn't load the assembly, and continue doing work.
Resolves #7
Potentially provides a temporary workaround for #8, #9
|
|
You can `make prepare all check` to compile and run unit tests.
Additionally, you can open `apidoctools.sln` in Visual Studio to develop and debug.
_Please Note:_ You will have to `make prepare all CONFIGURATION=Debug` for VS to work, as this
compiles external dependencies, and copies them to the `bin/Debug` folder, where VS will be expecting them.
|
|
These tests are sensitive to differences in line endings between Windows and
other platforms. This patch changes the diff commands used on Windows to
ignore changes in whitespaces at end of lines.
|
|
We don't use svn anymore since a very long time and some diff implementations (e.g. in Alpine) don't support --exclude.
Removing the argument is an easy fix.
|
|
|
|
|
|
[mdoc] Extension method crash fix, removes -multiassembly
|
|
|
|
to appease MS msbuild
|
|
|
|
use full path.
One of csc prerequisites because csc uses -lib as path which is considered after
RuntimeEnvironment.GetRuntimeDirectory which makes -lib useless
|
|
|
|
This was inadvertently removed in https://github.com/mono/mono/commit/611a43ee0f672adbac3e25dc77731843a3d10cf1 from MulticastDelegate.CombineImpl().
Add the type check back in the Delegate base class, we already do the same in Remove().
Add unit tests to cover the behavior to the corlib test suite. (reverted from commit f29878dc713f4e148fe0a1e703fae8929e6fb6e0)
Needed to update some monodoc tests to match that an exception is now thrown again.
|
|
E.g. on a German language OS the "make check-mdoc-export-html" test fails with this:
```
diff --exclude=.svn -rup Test/en.expected/Mono.DocTest/Widget.xml Test/en.actual/Mono.DocTest/Widget.xml
--- Test/en.expected/Mono.DocTest/Widget.xml 2015-11-18 04:42:11.000000000 +0100
+++ Test/en.actual/Mono.DocTest/Widget.xml 2016-02-04 02:38:09.000000000 +0100
@@ -1061,8 +1061,8 @@
</Docs>
</Member>
<Member MemberName="PI">
- <MemberSignature Language="C#" Value="protected const double PI = 3.14159;" />
- <MemberSignature Language="ILAsm" Value=".field familyorassembly static literal float64 PI = (3.14159)" />
+ <MemberSignature Language="C#" Value="protected const double PI = 3,14159;" />
+ <MemberSignature Language="ILAsm" Value=".field familyorassembly static literal float64 PI = (3,14159)" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -1070,7 +1070,7 @@
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
- <MemberValue>3.14159</MemberValue>
+ <MemberValue>3,14159</MemberValue>
<Docs>
```
The fix is to always use InvariantCulture for literal formatting.
|
|
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
|
|
[mdoc] Added -api-style parameter.
|
|
[mdoc] Improved error handling for multiassembly.
|
|
|
|
[mdoc] Marking `MDocPreserve` Obsolete.
|
|
|
|
The new `multiassembly` option lets you run `mdoc update` on assemblies that
contain the same types. This can come into play when you have a set of assemblies
that run on different platforms, with a slightly differing API surface area on
each platform (for example: tvOS, watchOS, iOS); in this case you can maintain
all of the documentation in a single set of XML documents.
With this option enabled, an `AssemblyInfo` node will be added for every assembly
that a type is found in, in addition to every member. While this may seem verbose,
it's really the only way to capture the information about what assemblies a given
type or member can be found in.
|
|
|
|
[mdoc] Now rewriting incorrect `MemberName`.
|
|
This was in response to a test failure noticed after this pull request was accepted: https://github.com/mono/mono/pull/2012#commitcomment-13325966
The solution was two-fold, the code removed was unecessary as this directory is created elsewhere right before the file is written (and with the correct name in the case of a unified type). Also a small change was made to the makefile to clean up some files which was causing some targets to be skipped, along with moving some targets to the `check-doc-tools` target.
|
|
In supplement of the changes submitted in 09b97cba2e7c2d9c68830d55ff3d99c5f36eb439, there were
some additional edge cases that were not originally considered, and so this patch resolves these
additional issues. In particular, there was a bug in the `RemoveApiStyle` method that wasn't
checking the value of the `apistyle` attribute before removing it. This caused members to be
stripped of apistyle inadvertently.
There was an issue in the type removal code that caused
too many files to be removed. This patch adds additional checks to make sure that a file isn't
going to be removed if it contains members in the other style that shoulnd't be removed
Finally, there was an issue that arose after the aforementioned changes in the `OrderTypeAttributes`
method. It was somewhat counterintuitive, but it wasn't allowing the reordering of attributes
with the `.Remove` method (throwing an exception). Not entirely sure why this was happening,
but using the `.RemoveNamedItem` method worked around the issue.
|
|
Specifically, when updating classic and unified assemblies, members
that were completely removed from one or both assemblies were not
being removed from the XML. This patch updates mdoc's `DeleteMember`
method to properly handle deletion in all scenarios (normal, classic, unified).
Of course, deletion will still not happen if one of two things is true:
- `--delete` is *not* passed into the `mdoc update` call and the member node
contains existing documentation.
- `--preserve` *is* passed into the `mdoc update` invocation.
In both of those cases, the member will not be deleted, and a message stating
as such will be written as a warning to the output.
|
|
This enum, which can be found in Xamarin's iOS and Mac products use a custom encoding
scheme which resulted in invalid values being shown when processed with mdoc. This patch
adds a special case to watch for this particular enumeration value, and decodes the data
correctly.
Additionally, the code that formats the values for flags enumerations was refactored. Future extensibility of this feature can now be done by simply implementing a new `FlagsFormatter`, and applying the proper logic in the `MakeAttributesValueString` function.
|
|
|
|
The existing update was not doing a good job of matching members that have both generic and non-generic members. So for example, if you had a method, `Foo<T>`, and added a non-generic version in a future update (`Foo`); you could end up with a situation where one of the members was being duplicated.
|