Skip to content
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

Apply casing to artifact.xml example #2938

Merged
merged 1 commit into from
Oct 19, 2017
Merged

Apply casing to artifact.xml example #2938

merged 1 commit into from
Oct 19, 2017

Conversation

guardrex
Copy link
Contributor

@mairaw per dotnet/sdk#1487 🎉 🎈

@dnfclas
Copy link

dnfclas commented Aug 18, 2017

@guardrex,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@guardrex guardrex changed the title Apply casing to artifacts.xml example Apply casing to artifact.xml example Aug 18, 2017
@mairaw
Copy link
Contributor

mairaw commented Aug 18, 2017

Does this work on the current version @guardrex?

/cc @eerhardt @nguerrera

@guardrex
Copy link
Contributor Author

Since comparisons are case insensitive, I think the file will work either way. However, a file produced today will not look like this. Even the spacing that @dasMulli fixed will be messed up. U could sit on this, of course, if they get it into 2.0.1. Otherwise, let me know if u prefer to just have a tracking issue for later, and I convert this into an issue.

@mairaw
Copy link
Contributor

mairaw commented Aug 19, 2017

So the docs should show the current behavior. I haven't personally tested this yet to see the results. If this is not how the files are generated today, we should log an issue for vnext.

@guardrex
Copy link
Contributor Author

@mairaw The prob I had was that the current output has even bad spacing ... remember? "super embarrassing" lol ... so I corrected the spacing but I left the package names in lowercase. The current example in the topic is a hybrid of reality and @dasMulli fixing it. I split the difference! 😀

To make it look like the actual version, it should look like this (baaaaad spacing) ...

<StoreArtifacts>
   <Package Id="castle.core"  Version ="4.1.0"/>
   <Package Id="moq"  Version ="4.7.63"/>
   <Package Id="newtonsoft.json"  Version ="10.0.3"/>
</StoreArtifacts>

Problem now tho is that I just tried to repro this locally and hit a big 💥. AFAICT the dotnet store command is broken with the 2.0.1 servicing release. I'll try dropping back to 2.0.0 to see if I can get it to work and get back to u.

@mairaw
Copy link
Contributor

mairaw commented Aug 19, 2017

So should we just make it clear this is not the auto-generated version but the good version to use? Thanks for investigating this. I can look at this later.

@guardrex
Copy link
Contributor Author

When a dev does a ...

dotnet publish --manifest manifest.xml

or via the project file ...

<PropertyGroup>
  <TargetManifestFiles>manifest.xml</TargetManifestFiles>
</PropertyGroup>

In theory (of course! lol), it won't matter and the file will work either way. It just looks bad that the file formatting is all goofy.

The more immediate prob tho is that I can't even get the instructions from the topic to work at all. I'm investigating now to see if I can get 2.0.0 CLI to work.

@guardrex
Copy link
Contributor Author

@mairaw 😢 broken. I'll open an issue and see what they say, but it worked with preview 2.0 and it 💥 now. It doesn't error out. It just hangs after ...

Property reassignment: $(GenerateNuspecDependsOn)="Build;_LoadPackInputItems; _WalkEachTargetPerFramework; _GetPackageFiles; " (previous value: "_LoadPackInputItems; _WalkEachTargetPerFramework; _GetPackageFiles; ") at C:\Program Files\dotnet\sdk\2.0.0\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets (43,5)

@guardrex
Copy link
Contributor Author

@mairaw kk let's see what they say ... https://github.com/dotnet/cli/issues/7481

@guardrex
Copy link
Contributor Author

guardrex commented Aug 20, 2017

@mairaw I propose both patch updates are closed at #2949 (comment) in favor of a proper set of fixes. If u want to go that way, just say the magic words .... ✨ Make It Happen! ™️ ✨ 😀

@eerhardt
Copy link
Member

Does this work on the current version ?

dotnet publish --manifest supports any valid XML whitespace and the case of the Package Id is case insensitive.

We have tests that use the normal casing:

https://github.com/dotnet/cli/blob/master/TestAssets/TestProjects/FluentProfile/FluentFilterProfile.xml
https://github.com/dotnet/cli/blob/master/TestAssets/TestProjects/NewtonsoftProfile/NewtonsoftFilterProfile.xml

<StoreArtifacts>
    <Package Id="Newtonsoft.Json" Version ="9.0.1"/>
</StoreArtifacts>

@mairaw
Copy link
Contributor

mairaw commented Sep 25, 2017

So if it works, this should be good to merge, right @guardrex?

@guardrex
Copy link
Contributor Author

I think showing the nice looking 2.1 version of the file is best. However if a dev inspects an artifacts.xml today, they'll see the nasty version.

Could mark this for 2.1 and wait, but that begs the question if in addition to the lowercase package names should the file shown in the topic also get the foul whitespace .. I mean make it look exactly like the tooling produces it today ... warts and all. 🐸

@mairaw
Copy link
Contributor

mairaw commented Sep 27, 2017

@DamianEdwards what do you think? Should we show in the runtime store topic the current behavior or wait until the issue is solved?

@guardrex And what it is about the foul whitespace? Does the topic work as-is now?

@guardrex
Copy link
Contributor Author

guardrex commented Sep 27, 2017

This is what it looks like until 2.1 ...

<StoreArtifacts>
   <Package Id="castle.core"  Version ="4.1.0"/>
   <Package Id="moq"  Version ="4.7.63"/>
   <Package Id="newtonsoft.json"  Version ="10.0.3"/>
</StoreArtifacts>

Lower-case package names (which work, of course) and foul spacing around the "Version" attributes (also works).

However, it's rather ugly imo and thus kind'a nasty to show to people. I felt it was so ugly that I made a compromise with myself ... I left the lower-case package names but fixed the spacing when I wrote the topic.

This PR seeks to fix the lower-case package names. That's really a 2.1 fix ... but ... but ... the foul spacing is really a 2.1 fix, too. The fix is over in dotnet/sdk#1487.

@mairaw
Copy link
Contributor

mairaw commented Sep 27, 2017

Got it. Thanks for explaining to me @guardrex. So, I think people can get confused when the output doesn't match what they're doing. My vote (even if it's ugly ATM) would be to wait until fix is done.

@guardrex
Copy link
Contributor Author

kk ... I'm just glad it'll be fixed. It's confusing to show package names cased all over the place then not in the file. Might leave a dev wondering, "Do they have to be lower-case for the file to work?"

I can patch the current topic and make it the Janet Jackson nasty file layout 😄 if you want ... let me know. Later at 2.1, I can come back for a 🌹 file beautification 🌷 pass.

@mairaw
Copy link
Contributor

mairaw commented Sep 27, 2017

What do you have against Janet Jackson? 😄

Let's see if @DamianEdwards has a different opinion on this. And I thought the current version already showed the nasty layout. when you wrote, did you beautify it a bit?

@guardrex
Copy link
Contributor Author

Beautified just a bit ...

It's the "Ms. Jackson" version right now. I couldn't stand that spacing. It gave me nightmares. 👻

@guardrex
Copy link
Contributor Author

@mairaw I just put in #3268 ... I'll come back at 2.1 and fix it up. Do you want to close here and take #3268 for now?

@mairaw mairaw merged commit 1a032af into dotnet:master Oct 19, 2017
@mairaw mairaw deleted the patch-1 branch October 19, 2017 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants