dolthub / dolt

Dolt – Git for Data
Apache License 2.0
17.92k stars 509 forks source link

Update GoLang version #1816

Closed josh-chamberlain closed 3 years ago

josh-chamberlain commented 3 years ago

From #doltpy channel:

https://discord.com/channels/746150696465727668/753669716907786411/849048609953153045

Alexis — 05/31/2021

I found using the absolutely latest version of GoLang to compile Dolt for Windows fixes the issue that @Steve Marton and @ericturner-pdap has with Doltpy. The Sharing Access Violation bug with Windows and GoLang was reported very, very recently (as of December 2020), so I believe the CI or whoever builds the binaries may need to update the version of GoLang being used to compile Dolt CLI (It's also the CLI that handles the noms files for those not familiar with Dolt. The DoltPy is a wrapper for the CLI and DoltPy calls the CLI internally).

I was able to run the script without issue after compiling Dolt myself on the very newest version of GoLang and then running it on the exact VM that had the same problem as both of you described.

ericturner-pdap — 05/31/2021

Awesome detective work @Alexis , hopefully the dolt team sees this and can push an official fix in a new release!

Alexis — 05/31/2021

Something I should note, if I don't do dolt reset --hard to clear out the invalid noms before running with the newly compiled dolt after I run the old dolt to cause the error, the error message does show up on the new dolt. I decided to do more extensive testing to make sure that the new dolt in fact solves the issues and wasn't a fluke. It does appear to solve the issue, but you'll need to reset the repo or get a fresh copy after installing the newly compiled dolt cli. Umm, so the bug may not actually be completely gone. I'm restarting the VM just to make sure no file handles are still attached to the repo and am cloning it from scratch after the restart (and replacing with the new Dolt CLI).

Yeah, nope. I don't think it's completely gone. I have to run dolt reset --hard after any Doltpy operation in order for Doltpy to be able to run any new operations. AHHHHH. It was working fine earlier. So, I'm disappointed that it's not working now.

Alexis — 05/31/2021

So, it turns out that the new version of GoLang did not fix the sharing violation exception. It was definitely a fluke. This may be something that the Dolthub team will have to implement themselves as the sharing violation is the bug that was on the bug report tracker for GoLang with these exact symptoms. I updated the bug report to make sure the team knows the issue still exists. At least since I'm 95% sure that it is a sharing violation due to it being a Windows specific bug and matching the symptoms exactly (as a few bug reports do exist on the GoLang tracker about this bug), I strongly believe creating a Windows specific fix where Dolt CLI opens the file with the deletable file flag will work. This is because Windows handles files differently than Mac and Linux which uses the Linux kernel (yes, Mac uses BSD styled Linux).

VinaiRachakonda commented 3 years ago

Closing this as it is similar to https://github.com/dolthub/dolt/issues/1774