-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add Windows CI support #161
Conversation
Win tests are failing. It looks like the line endings may differ in features and glif XML vs. Linux env test expected values?
|
Funny, I'm not getting an error running it on my Windows workstation. So, in |
I think that the intent is to write LF on all platforms so that there is no platform-specific serialization diff? |
Hm, then these diffs shouldn't be happening? Will try to look into this next week. |
@cmyr Thoughts on how to approach cross-platform line endings? Should norad write consistent line endings on all platforms (limits diff when norad serialization is used x-platform)? Keep line ending format that it reads in on subsequent serialization (maybe limits diff when norad serialization is used with other serializers)? Allow custom line ending support (flexible and maybe limits diffs across serializers and platforms)? @belluzj mentioned today that he likes the idea of a runebender config panel with Unix vs. Win line ending style options on UFO serialization. I think that we can expand the approaches used for spacing and XML declaration quote customization to address it if this is desirable. All of these options might be useful in such a config panel. |
I'd be most interested in knowing if there is an accepted convention for this. In the general case I would expect a tool to use the correct line endings for the given platform, unless there is an established convention to do otherwise? |
Made this an issue #162 |
Ok, so, I see this:
I'm not sure why some things are read with LF and others with CRLF, but I suppose the default should be to read and write (and insert) stuff using the platform defaults. Then, optionally, one can force all output to use LF. |
Okay, some notes:
I think that a reasonable solution to this is using a Okay, actually, there are two options: we can either ask git to treat things like |
Okay, this last failure is because |
Hm, we can, yes, but I'm still confused by the CRLF/LF behavior. Python converts everything to |
In most cases, we do not directly manipulate text files; we generally parse them into objects, and the parser discards the newlines. The main exception is FEA files, which we read directly. When reading a file, Rust reads it literally, and the line endings in the loaded file's contents will be the line endings on disk. So the main question is, "when writing files back out to disk, what line endings should norad use"? And I don't have strong opinions. In particular, we would need to figure out the behaviour of the The main question for me is: what behaviour do we want? Are there any conventions here? Once we know what we want, we can see what's involved in making it happen. |
Separate issue in support of this. I noticed over the weekend that this approach recursively pulls the submodule in ufofmt builds that use a git repo revision def in the Cargo.toml. I don't know if moving away from a git submodule addresses that? |
It should! |
I think we should write platform line endings by default but have a writer option for forcing LF. |
@chrissimpkins I'm going to rebase and force push this, apologies if I'm toe-stepping |
Not at all. |
#157 includes platform-specific approaches to XML serialization. This PR adds a Windows test runner to the existing GitHub Actions CI configuration