Error when using Go Import: "could not find part of the path"

Hi, I’ve had some fun with importing golang modules in my projects, but I stumbled on the following error while importing project GitHub - golang/protobuf: Go support for Google's protocol buffers

Here is the debug info: (sorry for the error message in Dutch - it’s “could not find part of the path…”)

ebuild --import-go-project GitHub - golang/protobuf: Go support for Google's protocol buffers

RemObjects EBuild. An open source build engine for Elements and beyond.
Copyright RemObjects Software 2016-2021. All Rights Reserved. Created by marc hoffman.
Version 10.0.0.2595 (develop) built on bajor, 20210116-141437. Commit b756e6f.

(1/1) Importing github.com.golang.protobuf (38 files)
(2/31) Importing github.com.golang.protobuf/proto (12 files)
Exception: Kan een gedeelte van het pad C:\dev\wtr\bchdnet\google.golang.org\protobuf.Import\google.golang.org\protobuf.encoding.prototext.Attributes.pas niet vinden.
| bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
| bij System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
| bij System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share)
| bij RemObjects.Elements.RTL.FileHandle.$New(String FileName, FileOpenMode Mode)
| bij RemObjects.Elements.RTL.File.WriteBytes(String aFileName, Byte[] Content)
| bij RemObjects.EBuild.CommandLine.<>c__DisplayClass1.ImportGoProject.ImportSingleGoProject(String aUrl, String aVersion, String aCommit)
| bij RemObjects.EBuild.CommandLine.<>c__DisplayClass1.ImportGoProject.ImportSingleGoProject(String aUrl, String aVersion, String aCommit)
| bij RemObjects.EBuild.CommandLine.<>c__DisplayClass1.ImportGoProject.ImportSingleGoProject(String aUrl, String aVersion, String aCommit)
| bij RemObjects.EBuild.CommandLine.ImportGoProject(EBuildContext aContext, SimpleCommandLineParser aParameters)
| bij RemObjects.EBuild.CommandLine.RunWithParameters____HostMode(SimpleCommandLineParser aParameters, Boolean aHostMode)

I can find the file:

C:\dev\wtr\bchdnet\github.com.protocolbuffers.protobuf-go.Import\github.com.protocolbuffers.protobuf-go.Attributes.pas

with contents:

namespace; [assembly:go.builtin.PackageName(“github.com.protocolbuffers.protobuf-go”, “main”)] end.

Curious. I’ll have a look.

Cool, glad to hear that! We haven’t had much feedback from users doing this on their end so far, so I’m happy to hear it’s been working for you (mostly ;).

Hmm. this imports fine here for me.

I assume C:\dev\wtr\bchdne is what you pass as --out: parameter (or is your current folder when you run the import)?

C:\dev\wtr\bchdnet\google.golang.org\protobuf.Import\google.golang.org\protobuf.encoding.prototext.Attributes.pas
C:\dev\wtr\bchdnet\github.com.protocolbuffers.protobuf-go.Import\github.com.protocolbuffers.protobuf-go.Attributes.pas

those are not the same paths; I dont have a “google.golang.org” in my import root here either, but it’s also not looking for it :(. The second one, which you have, I have also. Since Talk mangled the URL in the command like, I assume you’re passing https://github.com/golang/protobuf, correct?

I just dry-reviewed the code in question, and it’s fairy simple and I don


on an unrelated note, there are a few known compiler/GBL issues with building the protobuffer library that shoukld be addressed either in Friday’s upcoming build, or if not then hopefully the week after…

Bingo, I can repro this on Windows, but not on Mac. investigating what the difference could be, now.

Fixed for vNext. I can send you a new build later today, if you like.