Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Codegen line endings #1189

Merged
merged 2 commits into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
### Internal

- Added the `IComponentMetaclass` and `ICommandMetaclass` interfaces. Where we previously would use reflection to find instances of various component/command related types, we now lookup through generated metaclasses. [#1173](https://github.com/spatialos/gdk-for-unity/pull/1173)
- Code Generator now enforces platform line endings. [#1189](https://github.com/spatialos/gdk-for-unity/pull/1189)

## `0.2.9` - 2019-09-16

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ public void Run()
fileSystem.CreateDirectory(fileInfo.DirectoryPath);
}

fileSystem.WriteToFile(fileInfo.CompletePath, entry.Value);
// Fix up line endings
var contents = entry.Value
.Replace("\r\n", "\n")
.Replace("\n", Environment.NewLine);
Copy link
Contributor

@paulbalaji paulbalaji Oct 14, 2019

Choose a reason for hiding this comment

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

maybe add a comment on why we don't do replacements on just \r here

and add internal changelog

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How does the release tool react to me adding to the changelog at this point?
I'm not sure why this needs a comment, \r isn't a thing.

Copy link
Contributor

Choose a reason for hiding this comment

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

How does the release tool react to me adding to the changelog at this point?

It doesn't care


fileSystem.WriteToFile(fileInfo.CompletePath, contents);
}
}

Expand Down