Skip to content

Commit

Permalink
idl: Rename crate name to anchor-lang-idl (coral-xyz#2908)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto authored Apr 15, 2024
1 parent 257b560 commit f74ea64
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 36 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dev = []

[dependencies]
anchor-client = { path = "../client", version = "0.29.0" }
anchor-idl = { path = "../idl", features = ["build"], version = "0.1.0" }
anchor-lang-idl = { path = "../idl", features = ["build"], version = "0.1.0" }
anchor-lang = { path = "../lang", version = "0.29.0" }
anyhow = "1.0.32"
base64 = "0.21"
Expand Down
2 changes: 1 addition & 1 deletion cli/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::is_hidden;
use anchor_client::Cluster;
use anchor_idl::types::Idl;
use anchor_lang_idl::types::Idl;
use anyhow::{anyhow, bail, Context, Error, Result};
use clap::{Parser, ValueEnum};
use dirs::home_dir;
Expand Down
6 changes: 3 additions & 3 deletions cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ use crate::config::{
DEFAULT_LEDGER_PATH, SHUTDOWN_WAIT, STARTUP_WAIT,
};
use anchor_client::Cluster;
use anchor_idl::types::{Idl, IdlArrayLen, IdlDefinedFields, IdlType, IdlTypeDefTy};
use anchor_lang::idl::{IdlAccount, IdlInstruction, ERASED_AUTHORITY};
use anchor_lang::{AccountDeserialize, AnchorDeserialize, AnchorSerialize};
use anchor_lang_idl::types::{Idl, IdlArrayLen, IdlDefinedFields, IdlType, IdlTypeDefTy};
use anyhow::{anyhow, Context, Result};
use checks::{check_anchor_version, check_overflow};
use clap::Parser;
Expand Down Expand Up @@ -2609,7 +2609,7 @@ fn idl_build(
.path
}
};
let idl = anchor_idl::build::build_idl(
let idl = anchor_lang_idl::build::build_idl(
program_path,
cfg.features.resolution,
cfg.features.skip_lint || skip_lint,
Expand Down Expand Up @@ -2655,7 +2655,7 @@ in `{path}`."#
));
}

anchor_idl::build::build_idl(
anchor_lang_idl::build::build_idl(
std::env::current_dir()?,
cfg.features.resolution,
cfg.features.skip_lint || skip_lint,
Expand Down
2 changes: 1 addition & 1 deletion cli/src/rust_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{
config::ProgramWorkspace, create_files, override_or_create_files, solidity_template, Files,
VERSION,
};
use anchor_idl::types::Idl;
use anchor_lang_idl::types::Idl;
use anyhow::Result;
use clap::{Parser, ValueEnum};
use heck::{ToLowerCamelCase, ToPascalCase, ToSnakeCase};
Expand Down
2 changes: 1 addition & 1 deletion idl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "anchor-idl"
name = "anchor-lang-idl"
version = "0.1.0"
authors = ["Anchor Maintainers <[email protected]>"]
repository = "https://github.com/coral-xyz/anchor"
Expand Down
6 changes: 3 additions & 3 deletions lang/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ idl-build = [
"anchor-attribute-program/idl-build",
"anchor-derive-accounts/idl-build",
"anchor-derive-serde/idl-build",
"anchor-idl/build",
"anchor-lang-idl/build",
]
init-if-needed = ["anchor-derive-accounts/init-if-needed"]
interface-instructions = ["anchor-attribute-program/interface-instructions"]
Expand All @@ -49,8 +49,8 @@ anchor-derive-accounts = { path = "./derive/accounts", version = "0.29.0" }
anchor-derive-serde = { path = "./derive/serde", version = "0.29.0" }
anchor-derive-space = { path = "./derive/space", version = "0.29.0" }

# `anchor-idl` should only be included with `idl-build` feature
anchor-idl = { path = "../idl", version = "0.1.0", optional = true }
# `anchor-lang-idl` should only be included with `idl-build` feature
anchor-lang-idl = { path = "../idl", version = "0.1.0", optional = true }

arrayref = "0.3"
base64 = "0.21"
Expand Down
2 changes: 1 addition & 1 deletion lang/attribute/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ idl-build = ["anchor-syn/idl-build"]
interface-instructions = ["anchor-syn/interface-instructions"]

[dependencies]
anchor-idl = { path = "../../../idl", version = "0.1.0" }
anchor-lang-idl = { path = "../../../idl", version = "0.1.0" }
anchor-syn = { path = "../../syn", version = "0.29.0" }
anyhow = "1"
bs58 = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion lang/attribute/program/src/declare_program/common.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_idl::types::{
use anchor_lang_idl::types::{
Idl, IdlArrayLen, IdlDefinedFields, IdlField, IdlGenericArg, IdlRepr, IdlSerialization,
IdlType, IdlTypeDef, IdlTypeDefGeneric, IdlTypeDefTy,
};
Expand Down
2 changes: 1 addition & 1 deletion lang/attribute/program/src/declare_program/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod common;
mod mods;

use anchor_idl::types::Idl;
use anchor_lang_idl::types::Idl;
use anyhow::anyhow;
use quote::{quote, ToTokens};
use syn::parse::{Parse, ParseStream};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_idl::types::{Idl, IdlSerialization};
use anchor_lang_idl::types::{Idl, IdlSerialization};
use quote::{format_ident, quote};

use super::common::{convert_idl_type_def_to_ts, gen_discriminator, get_canonical_program_id};
Expand Down
2 changes: 1 addition & 1 deletion lang/attribute/program/src/declare_program/mods/client.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_idl::types::Idl;
use anchor_lang_idl::types::Idl;
use quote::quote;

use super::common::gen_accounts_common;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_idl::types::{Idl, IdlType};
use anchor_lang_idl::types::{Idl, IdlType};
use quote::{format_ident, quote, ToTokens};

use super::common::convert_idl_type_to_str;
Expand Down
2 changes: 1 addition & 1 deletion lang/attribute/program/src/declare_program/mods/cpi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_idl::types::Idl;
use anchor_lang_idl::types::Idl;
use heck::CamelCase;
use quote::{format_ident, quote};

Expand Down
2 changes: 1 addition & 1 deletion lang/attribute/program/src/declare_program/mods/events.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_idl::types::Idl;
use anchor_lang_idl::types::Idl;
use quote::{format_ident, quote};

use super::common::{convert_idl_type_def_to_ts, gen_discriminator};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_idl::types::{Idl, IdlInstructionAccountItem};
use anchor_lang_idl::types::{Idl, IdlInstructionAccountItem};
use anchor_syn::{
codegen::accounts::{__client_accounts, __cpi_client_accounts},
parser::accounts,
Expand Down
2 changes: 1 addition & 1 deletion lang/attribute/program/src/declare_program/mods/types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_idl::types::Idl;
use anchor_lang_idl::types::Idl;
use quote::quote;

use super::common::convert_idl_type_def_to_ts;
Expand Down
2 changes: 1 addition & 1 deletion lang/attribute/program/src/declare_program/mods/utils.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_idl::types::Idl;
use anchor_lang_idl::types::Idl;
use quote::{format_ident, quote};

use super::common::gen_discriminator;
Expand Down
2 changes: 1 addition & 1 deletion lang/src/idl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ impl IdlAccount {
}

#[cfg(feature = "idl-build")]
pub use anchor_idl::{build::IdlBuild, *};
pub use anchor_lang_idl::{build::IdlBuild, *};

0 comments on commit f74ea64

Please sign in to comment.