gorgeous-winter-99296
01/29/2024, 7:57 PMThe string '.go-1.21.6' is 36 long
Hex escaped: .go-1.21.6
As a list: ['/', 't', 'm', 'p', '/', 'p', 'a', 'n', 't', 's', '-', 's', 'a', 'n', 'd', 'b', 'o', 'x', '-', 'z', '7', 'F', '5', 'n', '1', '/', '.', 'g', 'o', '-', '1', '.', '2', '1', '.', '6']
After formatting: .go-1.21.6, len=36
[0]: / (47)
[1]: t (116)
[2]: m (109)
[3]: p (112)
[4]: / (47)
[5]: p (112)
[6]: a (97)
[7]: n (110)
[8]: t (116)
[9]: s (115)
[10]: - (45)
[11]: s (115)
[12]: a (97)
[13]: n (110)
[14]: d (100)
[15]: b (98)
[16]: o (111)
[17]: x (120)
[18]: - (45)
[19]: z (122)
[20]: 7 (55)
[21]: F (70)
[22]: 5 (53)
[23]: n (110)
[24]: 1 (49)
[25]: / (47)
[26]: . (46)
[27]: g (103)
[28]: o (111)
[29]: - (45)
[30]: 1 (49)
[31]: . (46)
[32]: 2 (50)
[33]: 1 (49)
[34]: . (46)
[35]: 6 (54)
Compare the length of the string with the contents! Where are all these characters coming from?! No matter what I do they are never printed when part of a string, and even multiple formatting-roundtrips preserves them. They clearly exist... but aren't visible. But they seem to be regular characters? I've never observed anything like this before. 🤯gorgeous-winter-99296
01/29/2024, 8:18 PM[0]: / (47) total='/'
[1]: t (116) total='/t'
[2]: m (109) total='/tm'
[3]: p (112) total='/tmp'
[4]: / (47) total='/tmp/'
[5]: p (112) total='/tmp/p'
[6]: a (97) total='/tmp/pa'
[7]: n (110) total='/tmp/pan'
[8]: t (116) total='/tmp/pant'
[9]: s (115) total='/tmp/pants'
[10]: - (45) total='/tmp/pants-'
[11]: s (115) total='/tmp/pants-s'
[12]: a (97) total='/tmp/pants-sa'
[13]: n (110) total='/tmp/pants-san'
[14]: d (100) total='/tmp/pants-sand'
[15]: b (98) total='/tmp/pants-sandb'
[16]: o (111) total='/tmp/pants-sandbo'
[17]: x (120) total='/tmp/pants-sandbox'
[18]: - (45) total='/tmp/pants-sandbox-'
[19]: I (73) total='/tmp/pants-sandbox-I'
[20]: 9 (57) total='/tmp/pants-sandbox-I9'
[21]: q (113) total='/tmp/pants-sandbox-I9q'
[22]: C (67) total='/tmp/pants-sandbox-I9qC'
[23]: z (122) total='/tmp/pants-sandbox-I9qCz'
[24]: Y (89) total='/tmp/pants-sandbox-I9qCzY'
[25]: '
[26]: . (46) total='.'
[27]: g (103) total='.g'
[28]: o (111) total='.go'
[29]: - (45) total='.go-'
[30]: 1 (49) total='.go-1'
[31]: . (46) total='.go-1.'
[32]: 2 (50) total='.go-1.2'
[33]: 1 (49) total='.go-1.21'
[34]: . (46) total='.go-1.21.'
[35]: 6 (54) total='.go-1.21.6'
Something with the 25th character there breaks...careful-address-89803
01/30/2024, 5:02 AMjq
and base64
caused some terminal output to just be redrawn over itself, so a multiline block just appeared as the last characters of each column.
Or, what happens if you base64 it on the golang side? does golang believe that the string is actually 36chars, or not?
I'm fascinatedcareful-address-89803
01/30/2024, 5:03 AMgorgeous-winter-99296
01/30/2024, 7:02 AMgorgeous-winter-99296
01/30/2024, 7:07 AMcurved-television-6568
01/30/2024, 7:09 AMgorgeous-winter-99296
01/30/2024, 8:29 AMpants test src/python/pants/backend/go/dependency_inference_test.py
I'd removed all the debugging but line 114 in goroot.py has some new prints:
.go-1.21.6
36
['/', 't', 'm', 'p', '/', 'p', 'a', 'n', 't', 's', '-', 's', 'a', 'n', 'd', 'b', 'o', 'x', '-', 'I', '9', 'q', 'C', 'z', 'Y', '/', '.', 'g', 'o', '-', '1', '.', '2', '1', '.', '6']
gorgeous-winter-99296
01/30/2024, 8:46 AMprint
which is what is used for those strings...curved-television-6568
01/30/2024, 10:02 AMcurved-television-6568
01/30/2024, 10:03 AMcurved-television-6568
01/30/2024, 10:04 AMgorgeous-winter-99296
01/30/2024, 10:05 AMcurved-television-6568
01/30/2024, 10:05 AM" G O R O O T " : " / p r i v a t e / t m p / p a n t s - s a n d b o x - 1 k d 8 C i / . g o - 1 . 2 1 . 6 " ,
curved-television-6568
01/30/2024, 10:07 AMcurved-television-6568
01/30/2024, 10:08 AMprint("/private/tmp/pants-sandbox-XQVpfm/.go-123")
gorgeous-winter-99296
01/30/2024, 10:09 AMcurved-television-6568
01/30/2024, 10:09 AMgorgeous-winter-99296
01/30/2024, 10:10 AMcurved-television-6568
01/30/2024, 10:11 AMgorgeous-winter-99296
01/30/2024, 10:11 AMcurved-television-6568
01/30/2024, 10:12 AM<sandbox>/...
gorgeous-winter-99296
01/30/2024, 10:12 AMgorgeous-winter-99296
01/30/2024, 10:12 AMcurved-television-6568
01/30/2024, 10:13 AMcurved-television-6568
01/30/2024, 10:14 AM<sandbox-Tyec0k>/...
etcgorgeous-winter-99296
01/30/2024, 10:15 AMcurved-television-6568
01/30/2024, 10:15 AMcurved-television-6568
01/30/2024, 10:15 AMcurved-television-6568
01/30/2024, 10:15 AMgorgeous-winter-99296
01/30/2024, 10:16 AMcurved-television-6568
01/30/2024, 10:16 AMgorgeous-winter-99296
01/30/2024, 8:48 PMgorgeous-winter-99296
01/30/2024, 8:49 PM