protoc-gen-go的新版本删除了已知类型

There are two .proto files

1st file | name "a.proto"

syntax = "proto3";

package a;

message AMsg{
    fixed64 smth1 = 1;
    fixed64 smth2 = 2;
}

2nd file | name "b.proto"

syntax = "proto3";

package b;

import "a.proto";

message BMsg {
    a.AMsg msg1 = 1;
    a.AMsg msg2 = 2;
}

previous versions of protoc-gen-go generated the following code:

file "a.pb.go"

package b

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"    

. . .  

type AMsg struct {
    smth1 uint64 
    smth2 uint64 
}

. . . 

file "b.pb.go"

package b

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"   
import "a"

. . .  

type BMsg struct {
    msg1 *a.AMsg
    msg2 *a.AMsg
}

. . . 

and everything was alright,

but

one day a new version of protoc-gen-go had come

and file "b.pb.go" now looks like this:

package b

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"   

. . .  

type BMsg struct {
    msg1 *AMsg
    msg2 *AMsg
}

. . . 

you can notice that already known types are dropped here, but i can't find out the reason. (i. e. prefix "a." i missing)

this link https://developers.google.com/protocol-buffers/docs/reference/go-generated says nothing about the new approach

What should I do to make protoc-gen-go to generate "b.pb.go" without these drops?

go_package option solved this, you should explicitly specify the package in a.proto

like this:

syntax = "proto3";

package a;
option go_package= "some_path/A";

message AMsg{
    fixed64 smth1 = 1;
    fixed64 smth2 = 2;
}

so you will get right generated types from a.proto in other proto files