)]}'
{
  "commit": "a59bb5ea7fa6857f2e2566366e7f35754a75f84a",
  "tree": "eeb3fe64af88ca129252875a7501780e7c41aaa1",
  "parents": [
    "276792923cf87d8f976651a00a0983eee03d8b31"
  ],
  "author": {
    "name": "Adam Cozzette",
    "email": "acozzette@google.com",
    "time": "Fri Dec 06 11:10:41 2024 -0800"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Fri Dec 06 11:13:41 2024 -0800"
  },
  "message": "Rust: remove references to `crate::` from generated code\n\nThis is necessary for the generated code to work correctly even when it\u0027s\nplaced in a module instead of directly in the crate root. Now we can finally\ndelete the last of the gencode post-processing from the protobuf_gencode crate.\n\nTo get this to work properly I had to update the `Context` object to keep track\nof the current module depth. This way we know how many `super::` prefixes we\nneed to prepend to an identifier to get back to the top level.\n\nI had to some refactoring of our naming helper functions to get everything\nworking properly:\n - Deleted `GetCrateRelativeQualifiedPath()`, since it seems simpler if we just\n   always provide unambiguous paths. I added some new `RsTypePath()` overloads\n   as a replacement.\n - Made `RustModuleForContainingType()` a private implementation detail of\n   naming.cc, since the `RustModule()` functions are more user-friendly and\n   accomplish the same thing.\n - Moved the logic for prepending super:: or the foreign crate name into\n   `RustModuleForContainingType()`. This way, all the helpers that call that\n   function automatically pick up the behavior we want.\n\nPiperOrigin-RevId: 703555727\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2997dc3ca5dc4a5b5e48bf6b73da7da32ef31743",
      "old_mode": 33188,
      "old_path": "rust/release_crates/protobuf_codegen/src/lib.rs",
      "new_id": "307a9c3e4bd69f846c5ed61bc6d763dc4a7e752a",
      "new_mode": 33188,
      "new_path": "rust/release_crates/protobuf_codegen/src/lib.rs"
    },
    {
      "type": "modify",
      "old_id": "23a1e6234d63df5fae8669a6aeed5fa6d7c3cc74",
      "old_mode": 33188,
      "old_path": "src/google/protobuf/compiler/rust/context.h",
      "new_id": "df5148d092928ce7ec6d8ede05d734f8a63ce172",
      "new_mode": 33188,
      "new_path": "src/google/protobuf/compiler/rust/context.h"
    },
    {
      "type": "modify",
      "old_id": "21c608bf9c97a5c7ecfacc2173c0e4929976d0ed",
      "old_mode": 33188,
      "old_path": "src/google/protobuf/compiler/rust/generator.cc",
      "new_id": "6451337eea0d6cd9579e5b47ac6b56ff409a8ab6",
      "new_mode": 33188,
      "new_path": "src/google/protobuf/compiler/rust/generator.cc"
    },
    {
      "type": "modify",
      "old_id": "49622881d059783170d39e25a11a7755f956ae69",
      "old_mode": 33188,
      "old_path": "src/google/protobuf/compiler/rust/message.cc",
      "new_id": "7225da3dae415149bcdd9e2d1d6b00c3015384d1",
      "new_mode": 33188,
      "new_path": "src/google/protobuf/compiler/rust/message.cc"
    },
    {
      "type": "modify",
      "old_id": "aac50675a6ed39f432b74824c1ba2356bb8ad30b",
      "old_mode": 33188,
      "old_path": "src/google/protobuf/compiler/rust/naming.cc",
      "new_id": "97d38401a672e91cb3ea5e1eb2674395e3c53981",
      "new_mode": 33188,
      "new_path": "src/google/protobuf/compiler/rust/naming.cc"
    },
    {
      "type": "modify",
      "old_id": "2707d8576a1f4c75e00f72b9aeb3b54e37395d66",
      "old_mode": 33188,
      "old_path": "src/google/protobuf/compiler/rust/naming.h",
      "new_id": "95a2d1446a447ce5109d719cca2d158b6e41aabe",
      "new_mode": 33188,
      "new_path": "src/google/protobuf/compiler/rust/naming.h"
    },
    {
      "type": "modify",
      "old_id": "b1acd7b83a4642764db5b3f37743d8113ba0a646",
      "old_mode": 33188,
      "old_path": "src/google/protobuf/compiler/rust/naming_test.cc",
      "new_id": "f2564114815dc21b8ca80fe2e217b919e759c528",
      "new_mode": 33188,
      "new_path": "src/google/protobuf/compiler/rust/naming_test.cc"
    },
    {
      "type": "modify",
      "old_id": "eb2afe912001ec72b89ac49374dcd284caabc22d",
      "old_mode": 33188,
      "old_path": "src/google/protobuf/compiler/rust/oneof.cc",
      "new_id": "5702c573bf934f15219e2c2f595a5fdffe8ee539",
      "new_mode": 33188,
      "new_path": "src/google/protobuf/compiler/rust/oneof.cc"
    }
  ]
}
