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

Doc Generation move to .NET core 3.0 #4113

Merged
merged 8 commits into from
Oct 1, 2019
Merged

Doc Generation move to .NET core 3.0 #4113

merged 8 commits into from
Oct 1, 2019

Conversation

Mpdreamz
Copy link
Member

This fixes the doc generation no longer working under .NET Core 3.0 since we moved (see: #4097)

This moves us to the latest Buildalyzer which seems to work for the most part :) Sadly this version lost our project filter contribution in a recent refactor. I might go back this week and submit a new PR but in the interest of moving along we now have a dedicated sln file under src/CodeGeneration that only references the relevant projects for the doc generation. cc @daveaglick

Touched up the folder locating routing by pinning global.json.

Rather then using branch or global json version we now document the intended current doc version in global.json separately. This allows branches to gen docs without the noise of all the headers changing.

This also now allows gendocs to be specified on non windows OS's, for some reason I had to duplicate LangVersion in the relevant csproj files directly. This was not needed on Windows but can't be bothered diving in further to learn why.

We still need to call dotnet codegeneration.dll rather than dotnet run since in the latter case it starts complaining about certain MEF 2.0 types not being available. Again too intricate to investigate and understand why.

@daveaglick
Copy link

😬 I opened an issue at phmonte/Buildalyzer#118 to add the project filter back in. I've got some work to do in Buildalyzer so I'll add this to the list. Does the approach in that issue seem correct?

Copy link
Contributor

@russcam russcam left a comment

Choose a reason for hiding this comment

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

LGTM. Just left a small comment


var globalJsonVersion = string.Join(".", Regex.Matches(File.ReadAllText(globalJson), "\"version\": \"(.*)\"")
var globalJsonVersion = string.Join(".", Regex.Matches(File.ReadAllText(globalJson), "\"doc_current\": \"(.*)\"")
Copy link
Contributor

Choose a reason for hiding this comment

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

Json.Net to parse global.json?

@russcam
Copy link
Contributor

russcam commented Oct 1, 2019

Pulling this in

@russcam russcam merged commit bac69dc into master Oct 1, 2019
russcam pushed a commit that referenced this pull request Oct 1, 2019
- Separate version from current doc version
- Source files should point to reference doc version as origin
- Use Json.NET to parse global.json
- Reference Buildalyzer package

For some reason the projects referenced by docs need LangVersion in the csproj file itself on linux while working fine on windows

(cherry picked from commit bac69dc)
russcam pushed a commit that referenced this pull request Oct 1, 2019
- Separate version from current doc version
- Source files should point to reference doc version as origin
- Use Json.NET to parse global.json
- Reference Buildalyzer package

For some reason the projects referenced by docs need LangVersion in the csproj file itself on linux while working fine on windows

(cherry picked from commit bac69dc)
russcam pushed a commit that referenced this pull request Oct 2, 2019
- Separate version from current doc version
- Source files should point to reference doc version as origin
- Use Json.NET to parse global.json
- Reference Buildalyzer package

For some reason the projects referenced by docs need LangVersion in the csproj file itself on linux while working fine on windows

(cherry picked from commit bac69dc)
@Mpdreamz Mpdreamz deleted the fix/master/codegen branch November 6, 2019 19:06
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.

3 participants