text stringlengths 0 2.35k |
|---|
[614.70 --> 618.94] But yeah, it's nice to know that there's a sort of improved data type there. |
[618.94 --> 626.16] And it's funny, like, you know, with the Go backwards compatibility promise, you can't just break things and break APIs and break everyone's code. |
[626.68 --> 627.78] You know, it's not Python. |
[628.32 --> 631.70] I shouldn't have a go at other languages, but Python does that a lot. |
[632.32 --> 635.14] But with that promise, of course, your hands get tied. |
[635.32 --> 644.28] So this is kind of a nice way of releasing almost like more modern implementations is to sort of release them alongside and then they kind of coexist. |
[644.28 --> 646.70] But does that create confusion? |
[646.98 --> 648.78] Like, how will people know which one to use? |
[648.94 --> 649.78] That's a good question. |
[650.14 --> 655.72] I think the Go standard library has a bunch of cases where there are packages and APIs that everybody knows not to use. |
[655.82 --> 659.62] Like there's container slash list that has like a linked list, for example. |
[659.88 --> 662.46] And I don't think everybody's used that outside of an example. |
[662.66 --> 662.80] Yeah. |
[663.16 --> 670.92] I don't think they can deprecate net IP simply because, as in the existing net.ip type, because it is used in existing APIs. |
[670.92 --> 679.10] But I think there is going to be a common understanding that if you want the extra nice features of the new type, you should just use it. |
[679.38 --> 679.46] Right. |
[679.88 --> 680.14] Great. |
[680.46 --> 681.10] Thank you. |
[681.24 --> 681.68] Nice one. |
[682.22 --> 682.86] Right, Michael. |
[682.86 --> 685.84] Maybe you could pick one to talk about next. |
[685.84 --> 692.18] I'll pick a couple of features that my colleagues, Jay and Brian, added to the Go command. |
[692.18 --> 708.50] So they are VCS build stamping and a debug build info function to get information about the versions of modules in a Go library as an Go binary as an API. |
[708.50 --> 720.08] So both of these have a similar core motivation, which is to improve visibility into binaries, to know which packages they were built on. |
[720.28 --> 726.48] So you can determine, say, if binaries were built with certain commits of code. |
[726.68 --> 733.04] In the case of VCS build stamping, because the main module may not have a version associated with it. |
[733.64 --> 737.06] And in the case of the build info of dependencies. |
[737.06 --> 749.56] And this is shaping up to be a big thing in these days to know whether your dependencies and the code that you're built with have bugs or bad features in them. |
[749.62 --> 754.38] And if the code that you're running with is safe and to audit everything properly. |
[754.78 --> 758.54] We've seen several cases of bad libraries in the wild. |
[758.80 --> 763.56] And people have to quickly audit if all their code is safe or not. |
[763.70 --> 765.56] All their code running in production is safe or not. |
[765.56 --> 767.38] Yeah, and it's a tricky thing. |
[767.56 --> 768.86] So I'm picking that a little bit then. |
[768.98 --> 776.78] So VCS, version control systems, like the Git hash, when you have a certain level that you've committed up to. |
[777.28 --> 778.98] And every time you commit, you get a new hash. |
[779.50 --> 783.12] And so now when we build, that will be incorporated. |
[783.38 --> 788.00] Is it like it supports all the major kind of VCS systems? |
[788.00 --> 790.00] So like it'll support Git and... |
[790.00 --> 790.88] Yeah, yeah. |
[790.88 --> 792.46] I mean, it definitely supports Git. |
[792.58 --> 798.00] I don't know what other VCSs we support if we do support other VCSs. |
[798.10 --> 799.32] Dan, do you know? |
[799.36 --> 800.22] But they'll be coming soon. |
[800.42 --> 804.16] I think there's Mercurial Bazaar subversion. |
[804.50 --> 806.18] And that might be it for these days. |
[806.42 --> 807.40] That's a good selection. |
[808.04 --> 809.10] Could you name five? |
[810.38 --> 812.08] Five VCS systems? |
[812.28 --> 813.18] Yeah, just five dead quick. |
[813.18 --> 815.18] Well, Dan named four, so... |
[815.18 --> 815.56] I know. |
[815.92 --> 816.72] So it should be easy. |
[816.84 --> 823.10] I think there was like, I've seen in the Go command, like a VCS named like Fossil that had support somewhere. |
[823.46 --> 825.28] So that'll round us out. |
[825.42 --> 825.98] There we go. |
[826.06 --> 826.66] Fossil, there we go. |
[826.72 --> 826.96] Five. |
[827.06 --> 827.28] Brilliant. |
[827.44 --> 827.78] There you go. |
[828.34 --> 828.68] Learning. |
[829.16 --> 829.60] So, okay. |
[829.70 --> 835.74] And then the other thing is that build info with all the dependencies, because that is a big thing. |
[835.74 --> 849.54] You know, sometimes, well, we're paying a lot more attention now to reporting vulnerabilities, capturing that data, and then being able to, in the tooling, use that to know whether we are dealing or running something that has some known vulnerability. |
[850.10 --> 850.18] Yeah. |
[850.30 --> 852.14] So that is a massive thing. |
[852.26 --> 857.48] And of course, having this put in there automatically saves us a lot of effort, right? |
[857.48 --> 868.42] My understanding is that build info is like a function that's like accessible to programs that was like just in the Go command before, like Go version dash M, right? |
[868.78 --> 881.28] So it makes it easier for other people to write these auditing programs that can help detect if there are bad versions in your dependencies and, you know, then flag it or fix it or whatever. |
[881.28 --> 891.20] And these automated things, I hope, can solve a lot of like manual human work that we've had to do when these issues have come up. |
[891.42 --> 891.54] Yeah. |
[891.94 --> 902.36] Well, it's very useful with like if you have Dependabot or whatever running in your continuous integration or just running in GitHub, like having those tools help, you know, it's all great. |
[902.44 --> 904.60] So anything in that effort, I think, is worth having. |
[905.10 --> 905.76] Very cool. |
[905.76 --> 911.26] And yeah, before we had to like use either build tags or do something else funky to get the version. |
[911.66 --> 912.62] I would always do that. |
[912.68 --> 918.84] I would have some script that would, I think I did it with Go Embed as well successfully recently. |
[919.32 --> 920.84] But we just don't have to do that now. |
[921.00 --> 924.88] And so we'll be able to access that version inside the build as well from somewhere. |
[925.34 --> 926.92] Sorry, access the... |
[926.92 --> 929.50] Access like the git hash inside the binary itself. |
[929.80 --> 930.66] Yeah, it's in the binary. |
[930.92 --> 934.32] So I don't know what the API is. |
[934.32 --> 934.72] Yeah. |
[935.24 --> 937.92] There's some either method or... |
[937.92 --> 938.14] Yeah. |
[938.40 --> 946.86] It's honestly a bit confusing because before there was an API to get the module information of yourself, like of your own running binary. |
[947.14 --> 955.10] But the new API they've added is you can give it a binary path so you can use it with any binary without having to shell out to go version dash and blah, blah, blah. |
[955.56 --> 956.74] It's essentially the same feature. |
[957.22 --> 960.84] Oh, so the build info includes that, the hash. |
[961.22 --> 962.26] Oh, well, there we go. |
[962.38 --> 962.58] Okay. |
[962.58 --> 969.28] And I think the VCS stamping is also a bit confusing to end users because you tell them Go 118 now stamps VCS build info. |
[969.28 --> 977.56] But they might say, if I go install a Go package, a Go main package, and I run Go version dash M with Go 117, I already see the module version, right? |
[977.56 --> 990.38] But where that doesn't work is instead of doing a global git install via a module path, if you git clone and then go build or go install locally from that git clone, Go doesn't know what module version that is. |
[990.46 --> 991.32] It just has a git clone. |
[991.32 --> 997.32] It's not resolving that module through the whole proxy system that tells it what version it is. |
[997.72 --> 1000.04] In Go 117, it tells you version devil. |
[1000.34 --> 1001.22] It has no idea. |
[1001.66 --> 1010.16] And in Go 118, it will add some extra separate metadata that will say, hey, this was built from git hash, blah, blah, blah, date, blah, blah, blah, and so on. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.