git.delta.rocks / unique-network / refs/commits / 83d67e5fa458

difftreelog

fix Rust Analyzer for common mod (#966)

Daniel Shiposha2023-07-10parent: #d8a735e.patch.diff
in: master
* fix: add common link

* fix: add windows note

* fix: rename common-link to runtime_common

7 files changed

modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -37,6 +37,12 @@
 Building Unique chain requires special versions of Rust and toolchain. We don't use the most recent versions of everything
 so that we can keep the builds stable.
 
+*Windows note: We do not provide support for Windows systems and don't test the Unique chain on them.
+Nonetheless, the Unique chain node might work on Windows. To build it on Windows, you need to enable symlink support in Git:*
+```
+git config --global core.symlinks true
+```
+
 1. Install Rust:
 
 ```bash
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -36,7 +36,6 @@
 
 use ::xcm::latest::NetworkId;
 
-#[path = "../../common/mod.rs"]
 mod runtime_common;
 
 pub mod xcm_barrier;
addedruntime/opal/src/runtime_commondiffbeforeafterboth
--- /dev/null
+++ b/runtime/opal/src/runtime_common
@@ -0,0 +1 @@
+../../common/
\ No newline at end of file
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
before · runtime/quartz/src/lib.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! The Substrate Node Template runtime. This can be compiled with `#[no_std]`, ready for Wasm.1819#![cfg_attr(not(feature = "std"), no_std)]20// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.21#![recursion_limit = "1024"]22#![allow(clippy::from_over_into, clippy::identity_op)]23#![allow(clippy::fn_to_numeric_cast_with_truncation)]24// Make the WASM binary available.25#[cfg(feature = "std")]26include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));2728extern crate alloc;2930use frame_support::parameter_types;3132use sp_version::RuntimeVersion;33use sp_runtime::create_runtime_str;3435use up_common::types::*;3637use ::xcm::latest::NetworkId;3839#[path = "../../common/mod.rs"]40mod runtime_common;4142pub mod xcm_barrier;4344pub use runtime_common::*;4546#[cfg(feature = "become-sapphire")]47pub const RUNTIME_NAME: &str = "sapphire";48#[cfg(not(feature = "become-sapphire"))]49pub const RUNTIME_NAME: &str = "quartz";50pub const TOKEN_SYMBOL: &str = "QTZ";51pub const DECIMALS: u8 = 18;5253/// This runtime version.54pub const VERSION: RuntimeVersion = RuntimeVersion {55	spec_name: create_runtime_str!(RUNTIME_NAME),56	impl_name: create_runtime_str!(RUNTIME_NAME),57	authoring_version: 1,58	spec_version: 942057,59	impl_version: 0,60	apis: RUNTIME_API_VERSIONS,61	transaction_version: 3,62	#[cfg(feature = "state-version-0")]63	state_version: 0,64	#[cfg(not(feature = "state-version-0"))]65	state_version: 1,66};6768parameter_types! {69	pub const Version: RuntimeVersion = VERSION;70	pub const RelayNetwork: NetworkId = NetworkId::Kusama;71}72#[cfg(feature = "become-sapphire")]73parameter_types! {74	pub const SS58Prefix: u16 = 8883;75	pub const ChainId: u64 = 8883;76}7778#[cfg(not(feature = "become-sapphire"))]79parameter_types! {80	pub const SS58Prefix: u8 = 255;81	pub const ChainId: u64 = 8881;82}8384construct_runtime!();8586impl_common_runtime_apis!();8788cumulus_pallet_parachain_system::register_validate_block!(89	Runtime = Runtime,90	BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,91	CheckInherents = CheckInherents,92);
after · runtime/quartz/src/lib.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! The Substrate Node Template runtime. This can be compiled with `#[no_std]`, ready for Wasm.1819#![cfg_attr(not(feature = "std"), no_std)]20// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.21#![recursion_limit = "1024"]22#![allow(clippy::from_over_into, clippy::identity_op)]23#![allow(clippy::fn_to_numeric_cast_with_truncation)]24// Make the WASM binary available.25#[cfg(feature = "std")]26include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));2728extern crate alloc;2930use frame_support::parameter_types;3132use sp_version::RuntimeVersion;33use sp_runtime::create_runtime_str;3435use up_common::types::*;3637use ::xcm::latest::NetworkId;3839mod runtime_common;4041pub mod xcm_barrier;4243pub use runtime_common::*;4445#[cfg(feature = "become-sapphire")]46pub const RUNTIME_NAME: &str = "sapphire";47#[cfg(not(feature = "become-sapphire"))]48pub const RUNTIME_NAME: &str = "quartz";49pub const TOKEN_SYMBOL: &str = "QTZ";50pub const DECIMALS: u8 = 18;5152/// This runtime version.53pub const VERSION: RuntimeVersion = RuntimeVersion {54	spec_name: create_runtime_str!(RUNTIME_NAME),55	impl_name: create_runtime_str!(RUNTIME_NAME),56	authoring_version: 1,57	spec_version: 942057,58	impl_version: 0,59	apis: RUNTIME_API_VERSIONS,60	transaction_version: 3,61	#[cfg(feature = "state-version-0")]62	state_version: 0,63	#[cfg(not(feature = "state-version-0"))]64	state_version: 1,65};6667parameter_types! {68	pub const Version: RuntimeVersion = VERSION;69	pub const RelayNetwork: NetworkId = NetworkId::Kusama;70}71#[cfg(feature = "become-sapphire")]72parameter_types! {73	pub const SS58Prefix: u16 = 8883;74	pub const ChainId: u64 = 8883;75}7677#[cfg(not(feature = "become-sapphire"))]78parameter_types! {79	pub const SS58Prefix: u8 = 255;80	pub const ChainId: u64 = 8881;81}8283construct_runtime!();8485impl_common_runtime_apis!();8687cumulus_pallet_parachain_system::register_validate_block!(88	Runtime = Runtime,89	BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,90	CheckInherents = CheckInherents,91);
addedruntime/quartz/src/runtime_commondiffbeforeafterboth
--- /dev/null
+++ b/runtime/quartz/src/runtime_common
@@ -0,0 +1 @@
+../../common/
\ No newline at end of file
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -36,7 +36,6 @@
 
 use ::xcm::latest::NetworkId;
 
-#[path = "../../common/mod.rs"]
 mod runtime_common;
 
 pub mod xcm_barrier;
addedruntime/unique/src/runtime_commondiffbeforeafterboth
--- /dev/null
+++ b/runtime/unique/src/runtime_common
@@ -0,0 +1 @@
+../../common/
\ No newline at end of file