-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
GH1540: Update to latest Roslyn #1645
Conversation
build/paths.cake
Outdated
@@ -26,7 +26,7 @@ public class BuildPaths | |||
var buildDir = context.Directory("./src/Cake/bin") + context.Directory(configuration); | |||
var artifactsDir = (DirectoryPath)(context.Directory("./artifacts") + context.Directory("v" + semVersion)); | |||
var artifactsBinDir = artifactsDir.Combine("bin"); | |||
var artifactsBinNet45 = artifactsBinDir.Combine("net45"); | |||
var artifactsBinNet45 = artifactsBinDir.Combine("net462"); |
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.
Also change variable name to artifactsBinNet462
@cake-build/cake-team I've removed some unused variables in path.cake and added so chocolatey/desktop CLR nuget content isn't hard coded any more. so we'll need to test so those still include all's that needed. |
@cake-build/cake-team I've sorted the merge conflicts and rebased against latest develop. |
Relates to #1540 |
For some reason GitHub won't "see" that the changes has been made.
@mholo65 Did you have a fix for the debugging that we could use? |
@patriksvensson only the |
@mholo65 Not sure, and I won't have time to do anything with this PR until the weekend soonest. |
@patriksvensson Ok! I'll see what I can do! |
Seems to hit the Also, I seem to hit same exception when debugging with |
you might consider going straight for Roslyn 3 (nightly) and avoid hand-rolled debugging code altogether 🙂 dotnet/roslyn#16489 |
actually, I forgot - that made it into Roslyn 2.3.0 already |
@filipw thanks for the heads up! @patriksvensson we should update to 2.3.x and check that out! |
@filipw got any examples for using the API? Will have a look at it tonight! |
As discussed on slack, i have been able to verify this is happening. |
{ | ||
_options = options; | ||
_nightlyFactory = nightlyFactory; | ||
_stableFactory = stableFactory; | ||
_loader = loader; | ||
_log = log; | ||
} | ||
|
||
public IScriptSession CreateSession(IScriptHost host, IDictionary<string, string> arguments) |
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.
While we are at it breaking stuff. Maybe we should remove arguments
from the interface?
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.
Agree! 👍
Roslyn now updated and debugging works. Unified the sessions also. Thanks again @filipw for pointing us in the right direction! |
great! 🎉 |
@cake-build/cake-team OK! I think this PR is ready to be merged. Do you mind taking a look at it and also take it for a final spin if you have time. |
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.
Just one thing...
src/Cake/Arguments/ArgumentParser.cs
Outdated
@@ -166,16 +166,6 @@ private bool ParseOption(string name, string value, CakeOptions options) | |||
options.PerformDebug = ParseBooleanValue(value); | |||
} | |||
|
|||
if (name.Equals("mono", StringComparison.OrdinalIgnoreCase)) |
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.
@patriksvensson @mholo65 I am not sure if these should be removed completely. I think we should deprecate these commands. i.e. leave them in just now, but have them only emit an error that the Mono scripting engine has been removed with an explanation as to why. Then in a future version, we can remove them completely. Thoughts?
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.
Removing them won't break anything afaik.
@Meir017 Yes, it's still used here: https://github.com/cake-build/cake/pull/1645/files#diff-3c3b3d790a1cf0ee07879f36796b4230R33 |
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.
With the new warning in place, LGTM at least 👍
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.
LGTM! Could we also start integration tests on this branch prior to merging?
@mholo65 triggered an integration test on Ubuntu with Bitrise now. |
@gep13 Not sure why, but your review doesn't seem to close although the changes has been addressed. |
@patriksvensson fixed |
@patriksvensson it didn't complete but don't think it's a PR issue will try to get them to rerun |
build.cake
Outdated
VersionSuffix = parameters.Version.DotNetAsterix, | ||
Configuration = parameters.Configuration, | ||
OutputDirectory = parameters.Paths.Directories.ArtifactsBinNet45, | ||
OutputDirectory = parameters.Paths.Directories.ArtifactsBinFullFx, | ||
Verbosity = DotNetCoreVerbosity.Minimal |
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.
@patriksvensson Currently getting an error with copy files on Linux
/usr/share/dotnet/sdk/1.0.4/Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/cake/src/Cake/Cake.csproj]
An error occurred when executing task 'Copy-Files'.
Adjusting copy files task like below seems to sort it
// .NET 4.6.2
DotNetCorePublish("./src/Cake", new DotNetCorePublishSettings
{
Framework = "net462",
VersionSuffix = parameters.Version.DotNetAsterix,
Configuration = parameters.Configuration,
OutputDirectory = parameters.Paths.Directories.ArtifactsBinFullFx,
- Verbosity = DotNetCoreVerbosity.Minimal,
+ MSBuildSettings = msBuildSettings
});
// .NET Core
DotNetCorePublish("./src/Cake", new DotNetCorePublishSettings
{
Framework = "netcoreapp1.0",
Configuration = parameters.Configuration,
OutputDirectory = parameters.Paths.Directories.ArtifactsBinNetCore,
- Verbosity = DotNetCoreVerbosity.Minimal,
+ MSBuildSettings = msBuildSettings
});
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.
LGTM now, but think we should rebase and squash a few commits before the final review & merge
Squash is Ok as long as individual authors changes are kept intact. I.e. Should be squashed to 4 or 5 commits. |
@mholo65 agreed 👍 |
* Updated projects to net462. * Cleaned up the project files. * Removed old versions of Roslyn. * Removed Mono scripting engine. * Added Roslyn script engine for full fx.
* Removed unused build script variables. * Cleaned up the build script.
* Update Roslyn to 2.3.1. * Use standardized way of emitting debug symbols for debug build. * Unify script sessions.
* Removed Mono.CSharp from license information. * Removed Roslyn NuGet source constant. * Added release notes for libraries. * Do not run integration tests with mono flag anymore. * Added warning when trying to use the Mono script engine. * Use MSBuild settings with 'dotnet publish' command.
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.
LGTM 👍
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.
LGTM!
This PR will do the following:
net462
instead ofnet45