Skip to content

[SR-12328] GYB Binary File Mode Incompatible With Ubuntu 16.04.6 #54759

Open
@swift-ci

Description

@swift-ci
Previous ID SR-12328
Radar rdar://problem/60230415
Original Reporter davertay (JIRA User)
Type Bug
Status In Progress
Resolution
Environment

Host OS is Ubuntu 16.04.6 with python v3.7.6

See https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1604-README.md

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee @beccadax
Priority Medium

md5: 308527b2cd490d68ae247079242d2e99

Issue Description:

This recent change to the GYB tool that introduced the error:

85599f7

Causes GYB to not work on the flavor of Linux launched from a Github action. The details of the host machine are here:
https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1604-README.md

Host OS is Ubuntu 16.04.6 with python v3.7.6

Error:
% python -m bin.gyb test.gyb
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/opt/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/gyb/bin/gyb.py", line 1261, in <module>
main()
File "/gyb/bin/gyb.py", line 1249, in main
ast = parse_template(args.file.name, args.file.read())
File "/gyb/bin/gyb.py", line 1063, in parse_template
return Block(ParseContext(filename, text))
File "/gyb/bin/gyb.py", line 408, in init
self.line_starts = get_line_starts(self.template)
File "/gyb/bin/gyb.py", line 36, in get_line_starts
for line in s.split('\n'):
TypeError: a bytes-like object is required, not 'str'

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions