Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Initial check-in for the System.Text.Json library and solution#33203

Merged
ahsonkhan merged 13 commits into
dotnet:masterfrom
ahsonkhan:AddJsonAssembly
Nov 5, 2018
Merged

Initial check-in for the System.Text.Json library and solution#33203
ahsonkhan merged 13 commits into
dotnet:masterfrom
ahsonkhan:AddJsonAssembly

Conversation

@ahsonkhan
Copy link
Copy Markdown

Comment thread pkg/descriptions.json Outdated
},
{
"Name": "System.Text.Json",
"Description": "Low allocations UTF-8 JSON reader/writer and serializer/deserializer.",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should only mention reader/writer in this PR and then update it to include serializer/deserializer when they're actually there. I'm fine either way.

<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PackageConfigurations>
netstandard1.1;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These APIs will be targeting .NET Core specifically as part of v1.
Providing a netstandard implementation can be considered in the future.

I left it as netstandard1.1 for now but this is not a guarantee by any means.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include netstandard2.0 to avoid large dependency graph from 1.x?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That diff is out-dated. I no longer have netstandard1.1 as a configuration. If I did, I would include netstandard2.0 as well, yes.

<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PackageConfigurations>
netstandard1.1;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a netstandard 1.1 ref?

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{6371299B-8F39-4A0A-A9CD-70F80FF205F6}</ProjectGuid>
<Configurations>netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release</Configurations>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question... I was expecting to see netcoreapp here.

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="878px" preserveAspectRatio="none" style="width:544px;height:878px;" version="1.1" viewBox="0 0 544 878" width="544px" zoomAndPan="magnify"><defs/><g><line style="stroke: #000000; stroke-width: 1.0;" x1="5" x2="542" y1="10" y2="10"/><line style="stroke: #000000; stroke-width: 1.0;" x1="5" x2="542" y1="12" y2="12"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="257" x="5" y="26.1387">PlantUML : a free UML diagram generator</text><line style="stroke: #000000; stroke-width: 1.0;" x1="5" x2="542" y1="33.9688" y2="33.9688"/><line style="stroke: #000000; stroke-width: 1.0;" x1="5" x2="542" y1="35.9688" y2="35.9688"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="50.1074"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="257" x="5" y="64.0762">(C) Copyright 2009-2017, Arnaud Roques</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="78.0449"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="205" x="5" y="92.0137">Project Info: http://plantuml.com</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="105.9824"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="418" x="5" y="119.9512">If you like this project or if you find it useful, you can support us at:</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="133.9199"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="309" x="5" y="147.8887">http://plantuml.com/patreon (only 1$ per month!)</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="167" x="5" y="161.8574">http://plantuml.com/paypal</text><image height="99" width="99" x="69" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGMAAABjCAYAAACPO76VAAABqUlEQVR42u3cUY7DIAwFwNz/0rsn6Erd+BkMY6k/lZoURgJsQp4fsU08ugCGgAFDwIAhYMAQMGAIGDD+/sHzlH8+Xf/b//DtdTrbBQMGjCUYr8bHok6vum9nu2DAgLEEIzE3dN53VbtgwIBxDEbVvAIDBgwYoUz7zX+AAQMGjIZMNdG5yiEwYByP0bmf0fm9zSUYMEZjpCO9bK2aGyJthwEDRnLOqOq4N+N4Yok8cmkLAwaMf98skBUnlp6dy1kYMGBstZ9RNdYnsvqqZfGYzSUYMO7AWDVep/dLrqvawoBxFkZVdpp+giRRiNwuA4cBA0ZXY1Y9L1vVuWMycBgw7sPoPO/dWYisqjLAgAFj2zck7DBGrzo3DgMGjBEnl6rG38SyNTHnbZ1nwIBxH0ZnMbFzDhiZgcOAAaN6zE0XEzvPgW+3nwEDBozJY/d1m0swYMBYkVHvcK47fTgTBgwYx2B0PkebnpNgwIAxDqMqG69adle1FwYMGMfUphKFucSJKRgwYIzAWPWOwsR8s8PDczBgwCjBELmAAUPAgCFgwBAwYAgYMASMy+IXQWy9veUVuosAAAAASUVORK5CYII=" y="164.6875"/><image height="99" width="99" x="296" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGMAAABjCAYAAACPO76VAAABpElEQVR42u3cW46DMAwFUPa/6ZkdVELxtQ0cS/2pWh45FY5j6PUn1sRlCGAIGDAEDBgCBgwBA4aAAeP3F66r/HV3vyfHtu28YMCAEcU4uj7eHKDEj2bqvGDAgDGCUXXyCaSq40mjwoAB4xEYVZ85mdrCgAEDRgijqgKHAQPGKzHS20kv3lkOgQHjlRiJAdrwvuYSDBiPxkhHuuquyg2Rc4cBA0ZXzqi6Fm/IYempMAwYMNZW4HcH96RXcbKvTyyHwIDxXoxE/tjQt0j0OWDAgLEqZ6RbnlNT53gvBAYMGJswOnPG1B0kMGDAWNvpm5o+dk6vV1TgMGDAqBjoqrySOJ7Oe3BhwIAxkjM6r8udU9vEQ6EwYMBYtTaVGNwpjERrFgYMGOMVeFUemlqU7OyXwIABI5ozOq/vieNMVPIwYMBYhdFZvae/O5WTYMCAMdLPmHreO/3PzvFpPQwYMJ6AcbLfqdwGAwaMT2F0bmfqRjcYMGC8pgJPVMJTN9vBgAFjBGPDfxR2Qn66uQQDxnMwxKKFQgEDhoABQ8AQMGAIGDAEjGfHP8OMD15VAMrjAAAAAElFTkSuQmCC" y="164.6875"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="405" x="5" y="274.8262">PlantUML is free software; you can redistribute it and/or modify it</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="421" x="5" y="288.7949">under the terms of the GNU General Public License as published by</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="406" x="5" y="302.7637">the Free Software Foundation, either version 3 of the License, or</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="210" x="5" y="316.7324">(at your option) any later version.</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="330.7012"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="360" x="5" y="344.6699">PlantUML distributed in the hope that it will be useful, but</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="501" x="5" y="358.6387">WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="428" x="5" y="372.6074">or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="154" x="5" y="386.5762">License for more details.</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="400.5449"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="371" x="5" y="414.5137">You should have received a copy of the GNU General Public</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="395" x="5" y="428.4824">License along with this library; if not, write to the Free Software</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="457" x="5" y="442.4512">Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="29" x="5" y="456.4199">USA.</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="470.3887"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="486" x="5" y="484.3574">PlantUML can occasionally display sponsored or advertising messages. Those</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="472" x="5" y="498.3262">messages are usually generated on welcome or error images and never on</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="128" x="5" y="512.2949">functional diagrams.</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="526.2637"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="510" x="5" y="540.2324">Images (whatever their format : PNG, SVG, EPS...) generated by running PlantUML</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="474" x="5" y="554.2012">are owned by the author of their corresponding sources code (that is, their</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="478" x="5" y="568.1699">textual description in PlantUML language). Those images are not covered by</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="100" x="5" y="582.1387">the GPL license.</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="596.1074"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="519" x="5" y="610.0762">The generated images can then be used without any reference to the GPL license.</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="520" x="5" y="624.0449">It is not even necessary to stipulate that they have been generated with PlantUML,</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="286" x="5" y="638.0137">also this will be appreciate by PlantUML team.</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="651.9824"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="537" x="5" y="665.9512">There is an exception : if the textual description in PlantUML language is also covered</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="474" x="5" y="679.9199">by a license (like the GPL), then the generated images are logically covered</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="158" x="5" y="693.8887">by the very same license.</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="707.8574"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="437" x="5" y="721.8262">This version of PlantUML records general local statistics about usage.</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="319" x="5" y="735.7949">(more info on http://plantuml.com/statistics-report)</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="749.7637"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="368" x="5" y="763.7324">Icons provided by OpenIconic : https://useiconic.com/open</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="423" x="5" y="777.7012">Archimate sprites provided by Archi : http://www.archimatetool.com</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="469" x="5" y="791.6699">Stdlib AWS provided by https://github.com/milo-minderbinder/AWS-PlantUML</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="467" x="5" y="805.6387">Stdlib Icons provided https://github.com/tupadr3/plantuml-icon-font-sprites</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="387" x="5" y="819.6074">ASCIIMathML (c) Peter Jipsen http://www.chapman.edu/~jipsen</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="416" x="5" y="833.5762">ASCIIMathML (c) David Lippman http://www.pierce.ctc.edu/dlippman</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="537" x="5" y="847.5449">CafeUndZopfli ported by Eugene Klyuchnikov https://github.com/eustas/CafeUndZopfli</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="387" x="5" y="861.5137">Brotli (c) by the Brotli Authors https://github.com/google/brotli</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="875.4824"/><!--
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we checking in GPLv3 stuff?!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From http://plantuml.com/faq

You can also use:
LGPL license
Apache license
Eclipse Public license
MIT license

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .svg says this:
image

Copy link
Copy Markdown
Author

@ahsonkhan ahsonkhan Nov 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can upload the image as png instead of the svg then.

Edit: Oops, was looking at the wrong svg, I see you meant the license file (which I have now updated).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @stephentoub. Lets remove the UML due to the licensing.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the licensing to MIT instead.

@stephentoub
Copy link
Copy Markdown
Member

I'm not seeing the actual code here, other than a single enum. Am I missing it?

@ahsonkhan
Copy link
Copy Markdown
Author

I'm not seeing the actual code here, other than a single enum. Am I missing it?

Nope, I wanted to get the initial skeleton checked-in first. The rest of the code will follow sooon.

Comment thread pkg/descriptions.json Outdated
},
{
"Name": "System.Text.Json",
"Description": "Low allocation UTF-8 JSON reader/writer.",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about something with more symmetry with the XmlReader description such as "Provides the System.Text.Json.Utf8JsonReader type, that provides fast, noncached, forward-only access to JSON data."

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, that works, but eventually the library will contain components outside of reader/writer. We can adjust it then.

Comment thread pkg/descriptions.json Outdated
"Name": "System.Text.Json",
"Description": "Low allocation UTF-8 JSON reader/writer.",
"CommonTypes": [
"System.Text.Json.JsonUtf8Reader"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we were going to go with the alternate name of Utf8JsonReader to be consistent with other types like Utf8String, no?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, from the API review: https://github.com/dotnet/apireviews/pull/73/files#diff-244c336af7586c3fec32cb2d485d9dc7R63

Also, related discussion:
dotnet/corefxlab#2577 (comment)

We can re-visit the name if you feel strongly about it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Despite being in the camp that suggested moving the "Utf8" to after "Json", I keep reading this now as some sort of JSON-ified "UTF-8 Reader". So maybe we should take another shot at the name. Utf8JsonReader or JsonReaderUtf8 being the obvious remaining candidates. "JsonReaderUtf8" sorts better, "Utf8JsonReader" seems more Englishy.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not worried about sorting: it's all in the Json namespace, and IntelliSense handles such cases well IMO. So from my perspective if we're not going to go with JsonUtf8Reader, it should be Utf8JsonReader.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth JsonUtf8Reader sounds like it's some sort of JSON-ified "UTF-8 Reader" to me as well. Either of those alternatives sound better to me.

Copy link
Copy Markdown
Author

@ahsonkhan ahsonkhan Nov 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, Utf8JsonReader it is. No one ever said naming things was easy.

https://spin.atomicobject.com/2017/09/01/naming-things-is-hard/

Comment thread src/System.Text.Json/roadmap/README.md Outdated
* Builds on top of the JsonReader and JsonWriter.
* Optimized for performance over feature richness for v1.
* The deserializer will be based on `Reflection.Emit`.
* More details to follow - @glennc, @terrajobst
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add @steveharter here too.

Copy link
Copy Markdown
Member

@joshfree joshfree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's replace the UML with just a list of types in the markdown for now

- The primary focus will be on core functionality with emphasis on performance
over capabilities and additional features.
- These APIs will be targeting .NET Core specifically as part of v1.
Providing a netstandard implementation can be considered in the future.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not consistent with what you have in src/System.Text.Json/src/Configurations.props

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it as netstandard1.1 for now but this is not a guarantee by any means. I strongly suspect future APIs will require us to drop this naturally, but I didn't want to drop it artificially until necessary.

But, if it is causing confusion, I can drop to .NET Core only from the get go.

<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
Copy link
Copy Markdown
Author

@ahsonkhan ahsonkhan Nov 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the appropriate assembly version to start with? cc @ericstj

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually start with 4.0.0.0 from as far as I know.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't necessary to start at 4.0.0.0 but we have generally done that for consistency with others which have a historical reason for doing so.

<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netcoreapp-Unix;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you be having Unix specific implementation? Because this is only needed if you’re going to have specific details for Unix and for windows and then conditionally include them.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I will not. Should I just have netcoreapp-Windows_NT then? Having just netcoreapp fails to compile.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fails to compile because of you are referencing CoreLib and netcoreapp implementation directly in .csproj. This package should not be referencing CoreLib. It should be just referencing the public surface via reference assemblies. Once you fix that, you will be able to make this to just netcoreapp.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you should be able to just reference System.Runtime and build for netcoreapp os agnostic.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I leave the uap configuration with the os specified?

Also, is it fine to keep the project reference to the System.Runtime ref within the System.Text.Json ref?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside ref projects we strongly push toward having only project reference to other ref projects because the reference assemblies are the first thing we build and ordering is not guaranteed so we use project references in ref projects to make sure we build all its dependencies when building a project.

Having the uap being os specific doesn't hurt anything because uap is not supported in Unix, however we try to only use it os specific when we're going to have conditions in the csproj using $(TargetsWindows) property. Because in order for it to be set correctly the configuration needs to be os specific.

<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netcoreapp-Unix;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question.

@ahsonkhan
Copy link
Copy Markdown
Author

@dotnet-bot test Linux arm64 Release Build

https://mc.dot.net/#/user/ahsonkhan/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/b9fd17db15453f5dc0065998644fdcfba730c3bf/workItem/System.Net.NameResolution.Pal.Tests

System.Net.NameResolution.PalTests.NameResolutionPalTests/TryGetAddrInfo_HostName

Unhandled Exception of Type Xunit.Sdk.EqualException
Message :
Assert.Equal() Failure
Expected: Success
Actual:   TryAgain
Stack Trace :
   at System.Net.NameResolution.PalTests.NameResolutionPalTests.TryGetAddrInfo_HostName() in /mnt/j/workspace/dotnet_corefx/master/linux-TGroup_netcoreapp+CGroup_Release+AGroup_arm64+TestOuter_false_prtest/src/System.Net.NameResolution/tests/PalTests/NameResolutionPalTests.cs:line 54

' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
' Requires PlantUML to interpret: http://plantuml.com/
' See license info under http://plantuml.com/faq for more details
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need/want any of this PlantUML stuff? I don't see any other UML in corefx.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I don't think the UML/graphics add any real value to the readme.

"4.0.4.0": "4.6.0"
}
},
"System.Text.Json": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we going to have a portable package for this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These APIs will be targeting .NET Core specifically as part of v1.
Providing a netstandard implementation can be considered in the future.

We will gather feedback from users and take that into account when deciding if we should have a portable package.


namespace System.Text.Json
{
public enum JsonTokenType : byte
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this really only have the one enum or are you just seeding the library?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think he is just seeding the library and then will add code progressively. Just so that the upstream plan with the package and what platforms it is going to support was clear.

@ahsonkhan
Copy link
Copy Markdown
Author

@dotnet-bot test NETFX x86 Release Build
@dotnet-bot test OSX x64 Debug Build

Unrelated CI failures:
https://github.com/dotnet/corefx/issues/32025
https://mc.dot.net/#/user/ahsonkhan/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/a87b37dab77c7363646f9eef632571e7093cda73/workItem/System.IO.Compression.Tests/analysis/xunit/System.IO.Compression.DeflateStreamUnitTests~2FDispose_WithUnfinishedReadAsync

Message :
Assert.Throws() Failure
Expected: typeof(System.AggregateException)
Actual:   (No exception was thrown)
Stack Trace :
   at System.IO.Compression.CompressionStreamUnitTestBase.<Dispose_WithUnfinishedReadAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

https://mc.dot.net/#/user/ahsonkhan/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/a87b37dab77c7363646f9eef632571e7093cda73/workItem/System.Reflection.Tests/analysis/xunit/System.Reflection.Tests.AssemblyNameTests~2FConstructor_String_LoadVersionTest

Message :
Assert.Throws() Failure
Expected: typeof(System.IO.FileNotFoundException)
Actual:   (No exception was thrown)
Stack Trace :
   at System.Reflection.Tests.AssemblyNameTests.Constructor_String_LoadVersionTest() in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Reflection/tests/AssemblyNameTests.cs:line 559

@ahsonkhan
Copy link
Copy Markdown
Author

@dotnet-bot test Windows x64 Debug Build
@dotnet-bot test Windows x86 Release Build

@ahsonkhan
Copy link
Copy Markdown
Author

@dotnet/dnceng, any ideas what's up with the Windows legs? They keep timing out after several hours.

It looks like other PRs are seeing a similar issue: https://github.com/dotnet/corefx/pulls
For instance: #33224

https://ci3.dot.net/job/dotnet_corefx/job/master/job/windows-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/18082/console

15:14:40 Done Building Project "D:\j\workspace\windows-TGrou---74aa877a\src\upload-tests.proj" (default targets).
15:14:40 
15:14:40 Build succeeded.
15:14:40     0 Warning(s)
15:14:40     0 Error(s)
15:14:40 
15:14:40 Time Elapsed 00:00:30.08

...

D:\j\workspace\windows-TGrou---74aa877a>taskkill /F /IM VBCSCompiler.exe 
ERROR: The process "VBCSCompiler.exe" not found.
[Pipeline] cleanWs
[WS-CLEANUP] Deleting project workspace...Cannot delete workspace :remote file operation failed: D:\j\workspace\windows-TGrou---74aa877a at hudson.remoting.Channel@5ad8114f:JNLP4-connect connection from 23.100.42.22/23.100.42.22:18368: java.io.IOException: Unable to delete 'D:\j\workspace\windows-TGrou---74aa877a\.dotnet\dotnet.exe'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
[Pipeline] echo
Some files could not be cleaned up because of running processes.  These processes will be killed immediately and cleanup will happen before the node upon node-reuse
[Pipeline] }

...

01:04:13 [Windows.7.Amd64.Open - x64 - Debug (8d8eca21-a0e4-428b-9f5d-3d995e9b101d)] Sending request to url: https://helix.dot.net/api/2017-04-14/aggregate/jobs?groupBy=job.name&maxResultSets=1&filter.name=8d8eca21-a0e4-428b-9f5d-3d995e9b101d
01:04:14 [Windows.7.Amd64.Open - x64 - Debug (8d8eca21-a0e4-428b-9f5d-3d995e9b101d)] Response Code: HTTP/1.1 200 OK
01:04:14 [Windows.7.Amd64.Open - x64 - Debug (8d8eca21-a0e4-428b-9f5d-3d995e9b101d)] Response: 
01:04:14 [Windows.7.Amd64.Open - x64 - Debug (8d8eca21-a0e4-428b-9f5d-3d995e9b101d)] [{"Key":{"job.name":"8d8eca21-a0e4-428b-9f5d-3d995e9b101d"},"Data":{"Analysis":[{"Name":"xunit","Status":{"pass":0,"passonretry":0,"fail":0,"skip":0}}],"WorkItemStatus":{"run":227,"pass":1}}}]
01:04:14 [Windows.7.Amd64.Open - x64 - Debug (8d8eca21-a0e4-428b-9f5d-3d995e9b101d)] Success code from [100‥399]
01:04:17 [Windows.7.Amd64.Open - x64 - Debug (8d8eca21-a0e4-428b-9f5d-3d995e9b101d)] Info: Passed 0 (0 skipped)
[Pipeline] [Windows.7.Amd64.Open - x64 - Debug (8d8eca21-a0e4-428b-9f5d-3d995e9b101d)] echo
[Pipeline] [Windows.7.Amd64.Open - x64 - Debug (8d8eca21-a0e4-428b-9f5d-3d995e9b101d)] }
01:04:21 [Windows.7.Amd64.Open - x64 - Debug (8d8eca21-a0e4-428b-9f5d-3d995e9b101d)] Will try again after 5 min 0 se

@ahsonkhan
Copy link
Copy Markdown
Author

@dotnet-bot test Windows x64 Debug Build
@dotnet-bot test Windows x86 Release Build

@MattGal
Copy link
Copy Markdown
Member

MattGal commented Nov 5, 2018

@ahsonkhan it looks like the Windows 7 Helix machines took a dive over the weekend, I've taken some hopefully corrective action that should fix this in the next 30 minutes (except work will be quite backed up for a while) and filed https://github.com/dotnet/core-eng/issues/4551 to fix it more correctly. My apologies for the inconvenience.

@MattGal
Copy link
Copy Markdown
Member

MattGal commented Nov 5, 2018

@ahsonkhan fixed and catching up now, but many thousands of work items behind. I'd estimate we should catch up to current by ~10:30 AM PST

@MattGal
Copy link
Copy Markdown
Member

MattGal commented Nov 5, 2018

Windows 7 processing has caught up to real time now. We'll continue to track this issue until we find and fix the underlying cause.

@ahsonkhan
Copy link
Copy Markdown
Author

@dotnet-bot test Windows x64 Debug Build
@dotnet-bot test Windows x86 Release Build

@ahsonkhan ahsonkhan merged commit 3af75a8 into dotnet:master Nov 5, 2018
@ahsonkhan ahsonkhan deleted the AddJsonAssembly branch November 5, 2018 19:45
@karelz karelz added this to the 3.0 milestone Nov 15, 2018
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…t/corefx#33203)

* Initial check-in for System.Text.Json library and solution

* Auto-generate the reference assembly

* Provide an overview README and roadmap

* Change the solution GUID to be unique

* Fix package description nit

* Change to MIT license instead of GPL

* Fix file extension of images to png

* Address PR feedback and only support netcoreapp

* Fix the configuration props and project files

* Address PR feedback, remove OS-specific configurations for netcoreapp

* Remove plantUML related files and add backup owner.

* Rename from JsonUtf8Reader to Utf8JsonReader within the package
description


Commit migrated from dotnet/corefx@3af75a8
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.