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

Starting the PJ schema changes #448

Merged
merged 18 commits into from Jul 10, 2016
Merged

Starting the PJ schema changes #448

merged 18 commits into from Jul 10, 2016

Conversation

blackdwarf
Copy link

@blackdwarf blackdwarf commented May 17, 2016

This is the starting point for changes to the project.json schema reference document to align it with the schema file. This file is the source of truth for the schema. Another resource is this announcement: aspnet/Announcements#175.

Ideally, we should also add samples to the file for some common scenarios. We should all party on this now.

Fixes #423

/cc @cartermp @mairaw @DamianEdwards

@mairaw
Copy link
Contributor

mairaw commented May 17, 2016

Do we have a link to the issue tracker?

@blackdwarf
Copy link
Author

Now we do.

@svick
Copy link
Contributor

svick commented May 18, 2016

Isn't project.json going away? Doesn't that mean there is not much point to document it extensively?

@cartermp
Copy link
Contributor

rebased since some TOC changes were made; now I'll do some updates

@richlander
Copy link
Member

@svick It's important that we provide good docs for RC2 and RTM to help folks use P.J. The move to csproj will be post-RTM.

@blackdwarf
Copy link
Author

Post-RTM for the platform. Important to distinguish. For tooling timelines, this means post-Preview 2 of the tooling.

* [builtIns](#publish-builtins)
* [mappings](#publish-mappings)
* [runtimeOptions](#runtimeoptions)
* [gcServier](#gcserver)

Choose a reason for hiding this comment

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

gcServer

Choose a reason for hiding this comment

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

Also the structure of runtimeOptions has changed. dotnet/aspnetcore#1418 (comment)

@richlander
Copy link
Member

@mairaw, @cartermp Are you on point to finish this PR off?

@blackdwarf
Copy link
Author

@mairaw @cartermp we do need this in a bad way. Can I help somehow to finsih this if you are overloaded?

@cartermp
Copy link
Contributor

Updated runtime stuff. The TODOs are what need to be filled in now

@mairaw
Copy link
Contributor

mairaw commented Jun 17, 2016

@blackdwarf I'm going to add some more missing pieces there and see where we're left.

@blackdwarf
Copy link
Author

@cartermp @mairaw thanks guys, you rock! :)

@mairaw
Copy link
Contributor

mairaw commented Jun 18, 2016

Released the file since @blackdwarf said he would work on this next. Can continue to work on this later on.

@blackdwarf
Copy link
Author

@ajaybhargavb can you please take a look at the current state and comment out what else needs to be done? Thanks!

* [resourceBuiltIn](#resourceBuiltIn)
* [excludeBuiltIn](#excludeBuiltIn)
* [namedResource](#namedresource)
* [packInclude](#packinclude)
Copy link

Choose a reason for hiding this comment

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

namedResource, packInclude and excludeBuiltIn are deprecated and can be removed.

@ajaybhargavb
Copy link

Looks good. I suggest adding a section that explains the structure to include/exclude files (content aspnet/Announcements#175 (comment)) and then replace the TODOs in compile, embed, copyToOutput, publishOptions and files with a link to this section.

@cartermp
Copy link
Contributor

Addressed feedback.

@cartermp
Copy link
Contributor

Rebased

For example:

{
"builtIns":[]
Copy link
Contributor

Choose a reason for hiding this comment

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

If builtIns is supposed to be an object, why is it an empty array here?

#### include
Type: String or String[] with a globbing pattern.

TODO

Choose a reason for hiding this comment

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

All these TODOs need to be replaced as well.

@cartermp
Copy link
Contributor

this is going to need another rebase because of the TOC/filename changes; I can get to that later today if it isn't done before then

@mairaw
Copy link
Contributor

mairaw commented Jun 24, 2016

I'm going to work a bit more on this one now.

@mairaw
Copy link
Contributor

mairaw commented Jun 25, 2016

@blackdwarf @cartermp @ajaybhargavb I have a new version up. Please take a look. I think we're getting close.

I have a couple of questions though.

  • There's a TODO in the commands section about investigating actual status. Who can confirm this?
  • buildoptions\additionalArguments: we have this in the doc but I don't see this in the announcement or in the schema. Should I remove it?
  • We have a couple of enum types in the schema. Should we list the possible values here? For example, for languageVersion we say ISO-1, ISO-2, 3, 4, 5, 6, or Default and show an example using the value "5". However, the schema shows these values: "csharp1", "csharp2", "csharp3", "csharp4", "csharp5", "csharp6", "experimental". Is that example correct? Wouldn't be better to show these values instead of ISO-1, etc.?
  • buildOptions\debugType: it's in the schema, but not in the announcement. Should it be included?
  • buildOptions\xmlDoc: it's in the announcement, not in the schema. Ok to keep it?
  • buildOptions\preserveCompilationContext - no default?
  • runtimeOptions: do the following entries really exist?
    System.GC.RetainVM, System.Threading.ThreadPool.MinThreads and System.Threading.ThreadPool.MaxThreads
    They're not in the schema. If so, what's the default value of RetainVM?
  • We have references to dnx50 and rc2 in some examples. Do we need to change it? e.g.
    "frameworks": {
        "dnxcore50": {
            "dependencies": {
                "Microsoft.Extensions.JsonParser.Sources": "1.0.0-rc2-23811"
            }
        }
    }

"summary": "This is my library."
"packOptions": {
"summary": "This is my library."
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

A mix of tabs and spaces is used here and in the following examples (e.g. 4 spaces before {, 2 tabs before "summary").

Though it doesn't really matter, since it seems to render correctly in both GitHub and docfx.


Keys to the object represent destination paths in the output layout.

Values are either a string or an object representing the source path of files to include. The object represtation can have its own `include`, `exclude`, `includeFiles` and `excludeFiles` sectins"dest/path": "source/path" or "dest/path": { "include": "./src/path" }
Copy link

Choose a reason for hiding this comment

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

Need to correct this, sectins"dest/path"
Also in other options that contain mappings

@ajaybhargavb
Copy link

@cartermp
Copy link
Contributor

Ready to merge?

@cartermp cartermp mentioned this pull request Jun 30, 2016
7 tasks
@mairaw
Copy link
Contributor

mairaw commented Jun 30, 2016

Nope @cartermp, I have to incorporate @ajaybhargavb's latest feedback. I'll finish this today. Sorry for the delay. I even have a lovely red tag saying do-not-merge because it's not ready yet. 😄

@mairaw
Copy link
Contributor

mairaw commented Jul 1, 2016

So here's the feedback on schema. Should I open a bug somewhere @ajaybhargavb?

  • It's missing buildoptions\additionalArguments
  • It's missing buildoptions\xmlDoc
  • buildoptions\preserveCompilationContext is missing the default value
  • runtimeOptions section is missing the other configProperties (at least the announcement seems to indicate they were added)
  • maybe it's missing framework and applyPatches inside runtimeOptions

@mairaw
Copy link
Contributor

mairaw commented Jul 1, 2016

Did a new update. Added debugType and outputName.

Questions still pending:

  • There's a TODO in the commands section about investigating actual status. Who can confirm this?
  • We have a couple of enum types in the schema. Should we list the possible values here? For example, for languageVersion we say ISO-1, ISO-2, 3, 4, 5, 6, or Default and show an example using the value "5". However, the schema shows these values: "csharp1", "csharp2", "csharp3", "csharp4", "csharp5", "csharp6", "experimental". Is that example correct? Wouldn't be better to show these values instead of ISO-1, etc.?
  • runtimeOptions: do the following entries really exist? System.GC.RetainVM, System.Threading.ThreadPool.MinThreads and System.Threading.ThreadPool.MaxThreads They're not in the schema. If so, what's the default value of RetainVM?

/cc @cartermp @blackdwarf @ajaybhargavb

@blackdwarf
Copy link
Author

@mairaw replied about the commands. Commands are deprecated. There is no way to invoke them any more, really, so I'm not sure if we should keep them around.

@ajaybhargavb what is the correct set ofvalues for the enum?

@schellap can you help us with the various runtimeOptions that are listed above please? What are the things we read in at runtime?

@schellap
Copy link

schellap commented Jul 5, 2016

@blackdwarf Below link has the list of well-known config options under title "host configuration knobs". The $.runtimeOptions.configProperties can contain any valid JSON key-value: it is used to opt out of specific KB or zero-day updates or allow us to invent one on the fly, etc. Effectively, these keys/values may not be known in advance. Any "string": JSONValue can appear under $.runtimeOptions.configProperties node and will be available to managed code at execution time. Note: these free form key/values will need to be in sync with any schema documentation you write, so it is better to only include what we know for now or link to an evolving page maintained in our repos. I'm calling this out so that someone is not going to do a strict schema validation on this node: $.runtimeOptions.configProperties.

https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/clr-configuration-knobs.md#host-configuration-knobs

@ajaybhargavb
Copy link

@mairaw, the bugs for missing fields in Schemastore should be filed here https://github.com/SchemaStore/schemastore/issues

@blackdwarf, I am not aware of the correct values for these enums

@svick
Copy link
Contributor

svick commented Jul 5, 2016

@blackdwarf When I add something to "commands", Visual Studio still seems to pick it up and show it as a debug profile. Is that expected?

@mairaw
Copy link
Contributor

mairaw commented Jul 6, 2016

I've made more changes based on the comments from today. Is this ready to merge?
Also filed the bug for the schema changes.

The only question left was about the enum values.

@ajaybhargavb
Copy link

Thanks for filing the bug.
:shipit: after addressing https://github.com/dotnet/core-docs/pull/448/files#r68671400 and figuring out the enum values.
Ping @DamianEdwards, if you want to review this PR.

@mairaw
Copy link
Contributor

mairaw commented Jul 6, 2016

oh yeah, there are multiple mappings sections with that issue. I'll fix those. Thanks @ajaybhargavb!

@mairaw
Copy link
Contributor

mairaw commented Jul 10, 2016

Should we review this as-is?
I tried pinging @davidfowl and @piotrpMSFT this week but haven't heard back yet on the enums. Not sure if they're the right folks to ask that.
I believe that's the only thing pending but this version should be much better than the published one.

@cartermp
Copy link
Contributor

Let's ship and iterate on future improvements.

@mairaw
Copy link
Contributor

mairaw commented Jul 10, 2016

🎆

@mairaw mairaw merged commit 60bb5a9 into master Jul 10, 2016
@cartermp
Copy link
Contributor

🎉

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.

None yet

7 participants