Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The minor version will be incremented upon a breaking change and the patch versi

### Fixes

- idl: Update `proc-macro2` usage for latest nightly ([#3663](https://github.com/solana-foundation/anchor/pull/3663))
- cli, docker: Replace `backpackapp/build` Docker image with `solanafoundation/anchor` ([#3619](https://github.com/coral-xyz/anchor/pull/3619)).

### Breaking
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lang/syn/src/idl/defined.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,9 @@ pub fn gen_idl_type(
use crate::parser::context::CrateContext;
use quote::ToTokens;

let source_path = proc_macro2::Span::call_site().source_file().path();
// If no path was found, just return an empty path and let the find_path function handle it
let source_path = proc_macro2::Span::call_site().local_file().unwrap_or(std::path::PathBuf::new());

if let Ok(Ok(ctx)) = find_path("lib.rs", &source_path).map(CrateContext::parse) {
let name = path.path.segments.last().unwrap().ident.to_string();
let alias = ctx.type_aliases().find(|ty| ty.ident == name);
Expand Down
Loading