Skip to content

Commit 487ac31

Browse files
committed
🔥 Bump Mojo version to nightly-2024.6.2614-78-0
1 parent 7870459 commit 487ac31

File tree

4 files changed

+31
-34
lines changed

4 files changed

+31
-34
lines changed

‎MODULE.bazel.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎mojo.nix

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ in
2525

2626
stdenv.mkDerivation rec {
2727
pname = "mojo";
28-
version = "2024.5.1905";
28+
version = "2024.6.2614";
29+
fullVersion = "${version}-78-0";
2930

3031
src = fetchurl {
31-
url = "https://packages.modular.com/nightly/mojo/packages/${version}/mojo-x86_64-unknown-linux-gnu-${version}-37-0.tar.zst";
32-
sha256 = "sha256-k4oIv9p4DQ7E7o8Jsb7ISJ+Rbqcj32q1LQIMxSSMiBo=";
32+
url = "https://packages.modular.com/nightly/mojo/packages/${version}/mojo-x86_64-unknown-linux-gnu-${fullVersion}.tar.zst";
33+
sha256 = "sha256-vviicX3lfdLKtjVbOkEZIG+o9usbfMCJhnzmALSNtfI=";
3334

3435
# Stable crashes in remote execution.
3536
# url = "https://packages.modular.com/mojo/packages/${version}/mojo-x86_64-unknown-linux-gnu-${version}-13-0.tar.zst";
@@ -81,7 +82,7 @@ stdenv.mkDerivation rec {
8182
# WARNING: At the moment linking phase can't figure out how to link tinfo.
8283
# To work around this we allow leaving the tinfo symbols undefined and
8384
# unlinked. This is a risky practice and might trigger segfaults at runtime.
84-
sed -i "s|system_libs = -lrt,-ldl,-lpthread,-lm,-lz,-ltinfo;|system_libs = -fuse-ld=mold,-lrt,-ldl,-lpthread,-lm,-Xlinker,-rpath=${glibc}/lib,-L,${zlib}/lib,-Xlinker,-rpath=${zlib}/lib,-Xlinker,-L,${tinfo}/lib,-Xlinker,-rpath=${tinfo}/lib,-Xlinker,-rpath=${stdenv.cc.cc.lib}/lib,-Xlinker,--unresolved-symbols=ignore-in-object-files,--verbose;|g" modular.cfg
85+
sed -i "s|system_libs = -lrt,-ldl,-lpthread,-lm,-lz;|system_libs = -fuse-ld=mold,-lrt,-ldl,-lpthread,-lm,-Xlinker,-rpath=${glibc}/lib,-L,${zlib}/lib,-Xlinker,-rpath=${zlib}/lib,-Xlinker,-rpath=${stdenv.cc.cc.lib}/lib,-Xlinker,--unresolved-symbols=ignore-in-object-files,--verbose;|g" modular.cfg
8586
'';
8687

8788
installPhase = ''

‎mojo/extensions.bzl

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,13 @@ def _rules_mojo_dependencies_impl(_):
1313
http_archive(
1414
name = "mojo",
1515
build_file = "@rules_mojo//thirdparty:mojo.BUILD.bazel",
16-
integrity = "sha256-M4hGfPmiY3PX9otPZk38JCwWEQgL3z/YOZJ04CDAmkk=",
16+
integrity = "sha256-PqgP+ELm4FL5989EJI8vjJvSRpPhtOpv5TH86k4BZR8=",
1717
urls = [
18-
# "https://github.com/modularml/mojo/archive/bf73717d79fbb79b4b2bf586b3a40072308b6184.zip"
19-
20-
# Nightly. Stable is broken.
21-
"https://github.com/modularml/mojo/archive/7e8cd37ff8fe2ddbe69a3cca787e59abf6357d76.zip",
18+
"https://github.com/modularml/mojo/archive/454974d477a44b93365181c77f20d9e1fe1aceaa.zip",
2219
],
23-
strip_prefix = "mojo-7e8cd37ff8fe2ddbe69a3cca787e59abf6357d76",
20+
strip_prefix = "mojo-454974d477a44b93365181c77f20d9e1fe1aceaa",
2421
)
2522

26-
# http_archive(
27-
# name = "local-remote-execution",
28-
# urls = [
29-
# "https://github.com/TraceMachina/nativelink/archive/refs/tags/v0.4.0.zip",
30-
# ],
31-
# integrity = "sha256-yhsJQZITkWjMcaFyniWL2R4YGxYuwduHdcer6eTXbJY=",
32-
# strip_prefix = "nativelink-0.4.0/local-remote-execution",
33-
# )
34-
3523
rules_mojo_dependencies = module_extension(
3624
implementation = _rules_mojo_dependencies_impl,
3725
)

‎thirdparty/mojo.BUILD.bazel

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ mojo_library(
3030

3131
# Handled separately due to nonstandard compile parameters.
3232
"stdlib/test/builtin/test_file.mojo",
33+
"stdlib/test/builtin/test_sort.mojo",
3334
"stdlib/test/os/test_getenv_setenv.mojo",
3435
"stdlib/test/sys/test_aarch64_target.mojo",
3536
"stdlib/test/sys/test_macos_target.mojo",
@@ -61,6 +62,7 @@ mojo_library(
6162
"stdlib/test/os/test_trap.mojo",
6263
"stdlib/test/os/test_trap_stringable.mojo",
6364
"stdlib/test/sys/test_exit_1.mojo",
65+
"stdlib/test/sys/test_dlhandle.mojo",
6466

6567
# rules_mojo doesn't support Python interop yet.
6668
"stdlib/test/python/test_ownership.mojo",
@@ -74,17 +76,23 @@ mojo_library(
7476
)
7577
]
7678

77-
mojo_test(
78-
name = "test_builtin_test_file",
79-
srcs = ["stdlib/test/builtin/test_file.mojo"],
80-
deps = [":stdlib"],
81-
defines = [
82-
# TODO(aaronmondal): Hack. Handle runfiles properly.
83-
"CURRENT_DIR=../_main~rules_mojo_dependencies~mojo/stdlib/test/builtin",
84-
"TEMP_FILE_DIR=testdir",
85-
],
86-
runtime_data = ["stdlib/test/builtin/test_file_dummy_input.txt"],
87-
)
79+
# These make use of _dir_of_current_file and expect to have the runtime data
80+
# available at the same location as the test executable, making them
81+
# incompatible with a naive Bazel `runfile` approach. To work around this we run
82+
# them locally.
83+
[
84+
mojo_test(
85+
name = file.replace("/", "_").removeprefix("stdlib_").removesuffix(".mojo"),
86+
srcs = [file],
87+
deps = [":stdlib"],
88+
tags = ["local"],
89+
runtime_data = ["stdlib/test/builtin/test_file_dummy_input.txt"],
90+
)
91+
for file in [
92+
"stdlib/test/builtin/test_sort.mojo",
93+
"stdlib/test/builtin/test_file.mojo",
94+
]
95+
]
8896

8997
# TODO(aaronmondal): Add support for testtime environment variables.
9098
# mojo_test(

0 commit comments

Comments
 (0)