Bug 59106 - comment inside type tag broke linker
Summary: comment inside type tag broke linker
Alias: None
Product: Android
Classification: Xamarin
Component: Linker ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Radek Doulik
Depends on:
Reported: 2017-08-30 03:23 UTC by Eric Liu
Modified: 2017-10-05 15:32 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

comment in xml breaks mono linker (1.27 KB, text/plain)
2017-08-30 18:03 UTC, Eric Liu

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 59106 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Eric Liu 2017-08-30 03:23:47 UTC
<?xml version="1.0" encoding="utf-8" ?>
  <assembly fullname="assembly">
    <type fullname="type" >

adding the comment line is breaking the linker
Comment 1 Jon Douglas [MSFT] 2017-08-30 05:08:42 UTC
Hi Eric,

First off, thanks for the bug report. We really appreciate you taking the time and effort to file this issue.

With regards to your report, can you please provide a reproducible case in which this demonstrates a comment line causing the LinkAssemblies Task to fail? The item you have copied will fail on the first <assembly> line because "assembly" is not an actual assembly name. For investigation purposes, we would need a valid test case. You can attach a reproduction project, or provide reproduction steps with code snippets!

I took a quick look into the source:

https://github.com/mono/linker/tree/master/linker (lots of great documentation here)



I then tested a simple type such as:

<?xml version="1.0" encoding="utf-8" ?>
  <assembly fullname="System.Core">
    <type fullname="System.Threading.ReaderWriterLockSlim" >

Which seems to build just fine. Thus it seems the linker has no problems with XML comments. Let me know what you find out on your end. Thanks again!
Comment 2 Eric Liu 2017-08-30 18:03:44 UTC
Created attachment 24486 [details]
comment in xml breaks mono linker

Sorry, forgot to add attachment.

[ working case ]:
<type fullname="System.Linq.AsyncEnumerable" >

this option not stripping AsyncEnumerable

[ non-working case ]:
<type fullname="System.Linq.AsyncEnumerable" >

this option with comment still stripping out AsyncEnumerable, so basically I think the linker somehow thinks there is only 1 child in type to exclude from linking, but it's a comment
Comment 3 Eric Liu 2017-08-30 18:07:15 UTC
I'm aware about the mono linker, but I don't have time to dig it out.