Skip to content

sui move build in 1.72.1 no longer emits compiler warnings from 1.71.1 #26708

@bu-bu-BUTASAN

Description

@bu-bu-BUTASAN

Steps to Reproduce Issue

I can reproduce a regression where sui move build no longer emits compiler warnings in Sui 1.72.1. The same package emits warnings in Sui 1.71.1.

Minimal package:

tmp=$(mktemp -d)
mkdir -p "$tmp/sources"
cat > "$tmp/Move.toml" <<'TOML'
[package]
name = "warnprobe"
edition = "2024"

[dependencies]
TOML
cat > "$tmp/sources/m.move" <<'MOVE'
module warnprobe::m;
use std::option::Option;
use std::vector;

public fun f(x: Option<u64>): Option<u64> { x }
MOVE

sui move build -p "$tmp" --force

I tested the same package with these binaries:

sui 1.71.1-2f5992f189cd
sui 1.72.1-94ad8ccd0ed6

Expected Result

Sui 1.72.1 should report the same warnings as 1.71.1. For the package above, Sui 1.71.1 emits diagnostics such as:

warning[W02021]: duplicate alias
./sources/m.move:2:18
Unnecessary alias 'Option' for module member 'std::option::Option'. This alias is provided by default

warning[W02021]: duplicate alias
./sources/m.move:3:10
Unnecessary alias 'vector' for module 'std::vector'. This alias is provided by default

warning[W09001]: unused alias
./sources/m.move:3:10
Unused 'use' of alias 'vector'. Consider removing it

Actual Result

With Sui 1.71.1, sui move build -p "$tmp" --force exits with status 0 and emits the W02021 and W09001 warnings above.

With Sui 1.72.1, the same command exits with status 0 but prints no warnings:

INCLUDING DEPENDENCY MoveStdlib
INCLUDING DEPENDENCY Sui
BUILDING warnprobe

This is not specifically about --warnings-are-errors. That flag only makes the regression easier to catch in CI: in 1.71.1, adding --warnings-are-errors turns the warnings into errors and exits non-zero, while in 1.72.1 the warnings are still not emitted.

I also observed the same class of issue through the language server path: sui analyzer / move-analyzer from 1.72 does not publish the duplicate_alias diagnostics for source files where the 1.71 move-analyzer does.

This looks like a regression between 1.71 and 1.72 rather than an intentional removal of the diagnostic: DuplicateAlias still appears to be a warning code, and compiler snapshot tests still appear to expect duplicate alias warnings. The warning filtering rewrite in #26282 may be related, but I have not confirmed the exact root cause.

System Information

  • OS: Ubuntu Linux x86_64, kernel 6.8.0-111-generic
  • Compiler affected: sui 1.72.1-94ad8ccd0ed6
  • Compiler comparison: sui 1.71.1-2f5992f189cd

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions