Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lake/Lake/Build/Module.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ def setupEditedModule
importArts := transImpArts
dynlibs := dynlibs.map (·.path)
plugins := plugins.map (·.path)
options := mod.leanOptions
options := mod.serverOptions
}

/--
Expand Down
7 changes: 7 additions & 0 deletions tests/lake/tests/setupFile/moreServerOptions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "test"

[moreServerOptions]
weak.foo = "baz"

[[lean_lib]]
name = "Test"
6 changes: 6 additions & 0 deletions tests/lake/tests/setupFile/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ test_out '"options":{}' setup-file ImportFoo.lean
# Lake can identify the module corresponding to the path.
test_out '"options":{"weak.foo":"bar"}' setup-file Test.lean

# Test that `moreServerOptions` applies to external modules.
test_out '"options":{"weak.foo":"baz"}' -f moreServerOptions.toml setup-file ImportTest.lean

# Test that `moreServerOptions` applies to internal modules.
test_out '"options":{"weak.foo":"baz"}' -f moreServerOptions.toml setup-file Test.lean

# Test that `setup-file` on an invalid Lean configuration file succeeds.
test_run -f invalid.lean setup-file invalid.lean

Expand Down
Loading