[
https://issues.apache.org/jira/browse/AVRO-3516?focusedWorklogId=769237&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-769237
]
ASF GitHub Bot logged work on AVRO-3516:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/May/22 18:51
Start Date: 11/May/22 18:51
Worklog Time Spent: 10m
Work Description: martin-g commented on PR #1683:
URL: https://github.com/apache/avro/pull/1683#issuecomment-1124175647
Good guess!
I've extracted the code in a separate app and now it indeed fails with:
```
Compiling derive-test v0.1.0 (/home/martin/tmp/rust/derive-test)
error: cannot find derive macro `AvroSchema` in this scope
--> src/main.rs:6:41
|
6 | #[derive(Debug, Serialize, Deserialize, AvroSchema)]
| ^^^^^^^^^^
|
note: `AvroSchema` is imported here, but it is only a trait, without a
derive macro
--> src/main.rs:2:5
|
2 | use apache_avro::AvroSchema;
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0599]: no function or associated item named `get_schema` found for
struct `A` in the current scope
--> src/main.rs:14:42
|
7 | struct A {
| ------
Issue Time Tracking
-------------------
Worklog Id: (was: 769237)
Remaining Estimate: 0h
Time Spent: 10m
> [rust] Avro Derive not working outside of repo context
> ------------------------------------------------------
>
> Key: AVRO-3516
> URL: https://issues.apache.org/jira/browse/AVRO-3516
> Project: Apache Avro
> Issue Type: Bug
> Reporter: Jack Klamer
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Avro Derive was not working outside of repo context for two reasons:
> 1) Not exported as part of avro dependency feature="derive" inside the lib.rs
> 2) Two not full qualified paths that were missed due to testing contexts
--
This message was sent by Atlassian Jira
(v8.20.7#820007)