Skip to content

Commit

Permalink
Fix "next" feture in soroban
Browse files Browse the repository at this point in the history
  • Loading branch information
graydon committed Sep 8, 2024
1 parent 04c3151 commit 158c722
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Builds/VisualStudio/stellar-core.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;psapi.lib;Credui.lib;userenv.lib;bcrypt.lib;ntdll.lib;$(OutDir)\rust\target\release\rust_stellar_core.lib;C:\Program Files\PostgreSQL\15\lib\libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>(set CFLAGS=-MDd) &amp; (set CXXFLAGS=-MDd) &amp; cargo build --release --target-dir $(OutDir)\rust\target --features tracy --features core-vnext</Command>
<Command>(set CFLAGS=-MDd) &amp; (set CXXFLAGS=-MDd) &amp; cargo build --release --target-dir $(OutDir)\rust\target --features tracy --features next</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Rust</Message>
Expand Down Expand Up @@ -268,7 +268,7 @@ exit /b 0
</IgnoreSpecificDefaultLibraries>
</Link>
<PreBuildEvent>
<Command>(set CFLAGS=-MDd) &amp; (set CXXFLAGS=-MDd) &amp; cargo build --release --target-dir $(OutDir)\rust\target --features tracy --features core-vnext</Command>
<Command>(set CFLAGS=-MDd) &amp; (set CXXFLAGS=-MDd) &amp; cargo build --release --target-dir $(OutDir)\rust\target --features tracy --features next</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Rust</Message>
Expand Down Expand Up @@ -330,7 +330,7 @@ exit /b 0
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;psapi.lib;Credui.lib;userenv.lib;bcrypt.lib;ntdll.lib;$(OutDir)\rust\target\release\rust_stellar_core.lib;C:\Program Files\PostgreSQL\15\lib\libpq.lib;%(AdditionalDependencies);</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>cargo build --release --target-dir $(OutDir)\rust\target --features tracy --features core-vnext</Command>
<Command>cargo build --release --target-dir $(OutDir)\rust\target --features tracy --features next</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Rust</Message>
Expand Down Expand Up @@ -1718,4 +1718,4 @@ $(OutDir)\bin\cxxbridge.exe ..\..\src\rust\src\lib.rs --cfg test=false --output
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CARGO_FEATURES += --features tracy
endif

if ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
CARGO_FEATURES += --features core-vnext
CARGO_FEATURES += --features next
main/XDRFilesSha256.cpp: $(SRC_X_FILES) Makefile $(top_srcdir)/hash-xdrs.sh
$(top_srcdir)/hash-xdrs.sh protocol-next >$@
else
Expand Down Expand Up @@ -84,7 +84,7 @@ stellar_core_LDADD += $(LIBRUST_STELLAR_CORE) -ldl
SOROBAN_BUILD_DIR=$(abspath $(RUST_BUILD_DIR))/soroban
ALL_SOROBAN_PROTOCOLS=$(notdir $(wildcard rust/soroban/p*))
SOROBAN_MAX_PROTOCOL=$(lastword $(sort $(ALL_SOROBAN_PROTOCOLS)))
CARGO_FEATURES_WITHOUT_NEXT=$(filter-out --features core-vnext,$(CARGO_FEATURES))
CARGO_FEATURES_WITHOUT_NEXT=$(filter-out --features next,$(CARGO_FEATURES))

define soroban_lib_dir
$(shell printf '$(SOROBAN_BUILD_DIR)/%s/target/$(RUST_PROFILE)' $(1))
Expand Down
4 changes: 2 additions & 2 deletions src/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ rev = "5ed156b7fb5dd3e46635aa0f818d5db33dfd6b6a"

tracy = ["dep:tracy-client"]

# The "vnext" feature enables not-yet-released features that (a) break protocol
# The "next" feature enables not-yet-released features that (a) break protocol
# but (b) are still under development, in between protocol releases. This
# feature is not enabled by default, and is only intended for temporary use when
# staging work across intra-protocol releases.
core-vnext = []
next = []
4 changes: 2 additions & 2 deletions src/rust/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ pub fn get_soroban_version_info(core_max_proto: u32) -> SorobanVersionInfo {
let xdr_base_git_rev = match VERSION.xdr.xdr {
"curr" => VERSION.xdr.xdr_curr.to_string(),
"next" | "curr,next" => {
if !cfg!(feature = "core-vnext") {
if !cfg!(feature = "next") {
warn!(
"soroban version {} XDR module built with 'next' feature,
but core built without 'core-vnext' feature",
but core built without 'vnext' feature",
VERSION.pkg
);
}
Expand Down

0 comments on commit 158c722

Please sign in to comment.