Skip to content

Preserve existing file encoding if it can be easily determined otherwise use UTF8 with BOM. #1149

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

Merged
merged 1 commit into from
Feb 25, 2017
Merged

Conversation

kll
Copy link
Contributor

@kll kll commented Feb 1, 2017

This fixes #1074 and will no longer strip the BOM or change the encoding when a file has a BOM. It does not handle cases where a BOM was not included or the existing encoding was not Unicode based. In those cases the files will be written using UTF8 with BOM as that is the most common and complies with StyleCop SA1412

@kll
Copy link
Contributor Author

kll commented Feb 1, 2017

At the moment it looks like the travis-ci MacOS queue is having some issues.

@kll
Copy link
Contributor Author

kll commented Feb 2, 2017

Yesterday when I submitted the PR the appveyor build passed but the travis-ci build failed due to their MacOS queue issues. Today I nudged the PR to cause a rebuild since travis-ci was back to normal but this time the inverse happened and appveyor failed while travis-ci passed. No code changed and looking at the log everything built and it shows 431 tests passed, 0 failed, 0 warnings, 0 inconclusive, 0 skipped. It just looks like NUnit3 crashed.

@asbjornu
Copy link
Member

asbjornu commented Feb 6, 2017

Seems like the problem is this:

Error : C:\projects\gitversion\src\GitVersionTask.Tests\bin\Release\GitVersionTask.Tests.dll
Object reference not set to an instance of an object.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at NUnit.Engine.Services.TestAgency.LaunchAgentProcess(TestPackage package)
   at NUnit.Engine.Services.TestAgency.CreateRemoteAgent(TestPackage package, Int32 waitTime)
   at NUnit.Engine.Runners.ProcessRunner.CreateAgentAndRunner()
   at NUnit.Engine.Runners.ProcessRunner.RunTests(ITestEventListener listener, TestFilter filter)

Perhaps upgrading NUnit can help?

@kll
Copy link
Contributor Author

kll commented Feb 6, 2017

I don't know, maybe it will, but why did it run and pass the day before? It also runs and passes fine when I run the build locally. I suspect something transient on the appveyor server and if it was just run again it would probably pass.

@asbjornu
Copy link
Member

asbjornu commented Feb 6, 2017

@kll: Ok, I've restarted the build. Let's see how it goes.

@JakeGinnivan JakeGinnivan merged commit e2b3aa1 into GitTools:master Feb 25, 2017
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.

UpdateAssemblyInfo strips byte order mark
3 participants