-
Notifications
You must be signed in to change notification settings - Fork 564
Update mono to 2017-02 "monthly master" branch [do not merge yet] #430
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
Conversation
… for compatibility.
| <ItemGroup> | ||
| <MonoDocCopyItem Include="monodoc.dll" /> | ||
| <MonoDocCopyItem Include="monodoc.dll.mdb" /> | ||
| <MonoDocCopyItem Include="monodoc.pdb" Condition="Exists ('monodoc.pdb')" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this Condition can possibly work. It's going to use the current working directory, and there are no odds that the current working directory will be external/mono/mcs/class/lib/net_4_x.
I think what you'd actually want to do is remove the Condition on this line and the following line, and instead update @(_MonoDocCopyItems) -- line 30? -- to be:
<ItemGroup>
<_MonoDocCopyItems
Condition=" Exists ('$(_MonoOutputDir)\%(Identity)') "
Include="@(MonoDocCopyItem->'$(_MonoOutputDir)\%(Identity)')"
/>
<_MonoDocInstalledItems
Condition=" Exists ('$(_MonoOutputDir)\%(Identity)') "
Include="@(MonoDocCopyItem->'$(_MandroidDir)\%(Identity)')"
/>
</ItemGroup>@dellis1972: Does the above sound correct to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't actually work either; top-level <ItemGroup/> values are processed at file-load time, i.e. when mono-runtimes.targets is processed, and thus is quite possible that Mono won't have been built yet, and thus the Condition expressions here will still fail.
I think we'll need a "helper" target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xmcclure sorry, I completely forgot that we needed the path in there.
Best thing to do is to write a target which will collect the files that exist. You can use the ItemGroup code that @jonpryor mentioned and pop that in the new Target. That will add the items to the ItemGroup at run time not load time.
<Target Name="_CollectDebuggingFiles">
<ItemGroup>
<_MonoDocCopyItems
Condition=" Exists ('$(_MonoOutputDir)\%(Identity)') "
Include="@(MonoDocCopyItem->'$(_MonoOutputDir)\%(Identity)')"
/>
<_MonoDocInstalledItems
Condition=" Exists ('$(_MonoOutputDir)\%(Identity)') "
Include="@(MonoDocCopyItem->'$(_MandroidDir)\%(Identity)')"
/>
</ItemGroup>
</Target>Then just add the _CollectDebuggingFiles target to the DependsOnTargets list of the target you need it to run before.
|
Hello! I'm the build bot for the Mono project. I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Contributors can ignore this message. |
1 similar comment
|
Hello! I'm the build bot for the Mono project. I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Contributors can ignore this message. |
|
Additionally, you need to update |
|
Should the existing |
The previous commit's attempts to copy the pdb/mdb files for monodoc had a problem where they would be evaluated too early (probably before the files existed) and in the wrong directory. To address this, the files are instead specified as a MonoDocCopyItemOptional, a new target _GetMonodocItems is created and the ItemGroups for _MonoDocCopyItems/_MonoDocInstalledItems are evaluated in this target with correct Exists logic for the Optional files. Additional DependsOnTargets attributes were distributed through the file to ensure this new target is evaluated at the correct time.
|
Okay, I think this is correct (please see full commit notes for details of what I did), and after doing a git clean xffd and rebuild the pdb appears to be getting copied to the right directory... Note, I had to add a bunch of DependsOnTargets-es to make this all work right. I did not touch the Depends logic for anything not specifically related to my changes, however, and I think you need to audit the dependencies of all items in ForceBuildDependsOn. Your current logic where you assume that separating X;Y by semicolons is enough to ensure X executes before Y is not safe, and (apparently!) can get subverted merely because a |
| Include="@(MonoDocCopyItemOptional->'$(_MonoOutputDir)\%(Identity)')" | ||
| /> | ||
| </ItemGroup> | ||
| <ItemGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can collapse these into one ItemGroup. there is not need to separate them. unless @jonpryor said to :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're not the same, one contains "mdoc.exe" and the other doesn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can mix different items within an ItemGroup so
<ItemGroup>
<Foo Include="Somefile.dll" />
<Bar Include="Someotherbarfile.dll" />
</ItemGroup>MSbuild and xbuild will evaluate each "item" separately. But its sometimes useful to put items together in logical groups just to make it easier to maintain. This is probably one of those cases :)
|
Moved to PR #445 |
To be merged after Wrench testing is complete and after the next xamarin-android branch.