You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow geoprocessing tools to run on an empty map - #3617
Allow a geoprocessing tool to create the first layer in an empty map. Previously, gp.run rejected every tool with “Run Tool: the map has no layers” before checking the tool’s inputs. Removing that command-level check lets the existing tool validation handle required inputs and explicitly selected layers, as it already does for background runs in the desktop Tools pane.
Testing
On Apple Silicon macOS 26.6.2, cargo test --locked -p rustgis-engine --lib plugin_tools_run_ passed all 3 tests. The new regression reproduced the empty-map error before the fix. With the fix, an offline test plugin creates the first point layer through both gp.run and the Tools pane’s background path. Both paths report a named missing layer, and Buffer still reports its missing required input. These tests use the repository’s plugin fixture.
Full local cargo xtask ci passed test hygiene, formatting and workspace Clippy, then stopped in rustgis-data. The data library suite had 2,144 passed, 1 failed and 11 ignored. The failing test, source::external::tests::timeout_returns_while_a_grandchild_holds_the_pipes, reported “the pipe-holder must finish after release” at crates/data/src/source/external.rs:556.
No actionable comments were generated in the recent review.
Walkthrough
gp.run no longer uses need_layers to gate command availability. A new test checks required and optional tool inputs on an empty map in foreground and background execution.
Changes: Empty-map tool runs
Layer / File(s)
Summary
Command availability and empty-map validation crates/engine/src/cmd/gp.rs, crates/engine/src/tests.rs
gp.run no longer applies need_layers as a command-availability condition. The test checks required-input errors and successful foreground and background runs that create a layer with one feature.
Tools that need no layer input can now run on an empty map, and tools that require a layer still report missing inputs. Risk is low; the Isoliner tools were not tested directly, and one unrelated data-crate CI test failed.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "Allow geoprocessing tools to run on an empty map" matches the main change. The PR removes the command-level check in gp.run that rejected every call when the map had no layers, so tools can…
Description check
The description follows the repository template. It has Summary, Testing, UI evidence, and Related issue sections. The Summary explains the change and its reason. Testing lists the exact commands, the…
Linked Issues check
[#3561] requires that tools without required layer input, or without selected layer-dependent input, run on an empty map through both the Tools pane and gp.run, and that missing-input validation still…
Out of Scope Changes check
The reviewed changes are a one-line removal of the need_layers gate from gp.run in crates/engine/src/cmd/gp.rs and a new regression test in crates/engine/src/tests.rs (+39 lines, per the summary). B…
Full details: Title check
Explanation
The title "Allow geoprocessing tools to run on an empty map" matches the main change. The PR removes the command-level check in gp.run that rejected every call when the map had no layers, so tools can create the first layer. The title is specific and concise and does not use vague terms.
Full details: Description check
Explanation
The description follows the repository template. It has Summary, Testing, UI evidence, and Related issue sections. The Summary explains the change and its reason. Testing lists the exact commands, the new regression test, and the failing data-library test. UI evidence correctly states that there is no visible UI change. Related issue links #3561. The description is complete and specific.
Full details: Linked Issues check
Explanation
[#3561] requires that tools without required layer input, or without selected layer-dependent input, run on an empty map through both the Tools pane and gp.run, and that missing-input validation still applies to layer-requiring operations. At head, the gp.run command definition in crates/engine/src/cmd/gp.rs no longer has .when(need_layers), so the command-level empty-map refusal is gone. The PR description states that the Tools pane background path already allowed this and that existing tool validation handles required and selected inputs. The added test plugin_tools_run_on_an_empty_map (crates/engine/src/tests.rs, per the summary) checks that a tool with an optional first parameter creates a layer on an empty map through both foreground and background execution, that a required-input tool still reports its error, and that a missing named input is reported without adding layers. The Isoliner acceptance checks (8.03 LandXML examples, 2.02 Download OSM topographic base) are external plugin behavior and are not tested in this repository; the fixture plugin covers the same rule. The data-crate test failure reported in the PR is outside the engine change and does not affect this assessment.
Full details: Out of Scope Changes check
Explanation
The reviewed changes are a one-line removal of the need_layers gate from gp.run in crates/engine/src/cmd/gp.rs and a new regression test in crates/engine/src/tests.rs (+39 lines, per the summary). Both connect directly to #3561. The gp.run parameter schema, roles and effects are unchanged, per the summary. No unrelated changes were identified. The full-PR text diff could not be read because changed blobs were unavailable in the checkout; this verdict relies on the head file read and the supplied summary.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit taps the empty map, Then runs a tool along its path. Missing inputs still raise a flag, While optional ones can make a layer. One feature springs from empty space, And foreground joins the background race.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: a0428c8a-f9b7-4c0f-96b0-afac949f5e50
Commits
Reviewing files that changed from the base of the PR and between d75248d and de54c79.
Files selected for processing: 2
crates/engine/src/cmd/gp.rs
crates/engine/src/tests.rs
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow a geoprocessing tool to create the first layer in an empty map. Previously,
gp.runrejected every tool with “Run Tool: the map has no layers” before checking the tool’s inputs. Removing that command-level check lets the existing tool validation handle required inputs and explicitly selected layers, as it already does for background runs in the desktop Tools pane.Testing
On Apple Silicon macOS 26.6.2,
cargo test --locked -p rustgis-engine --lib plugin_tools_run_passed all 3 tests. The new regression reproduced the empty-map error before the fix. With the fix, an offline test plugin creates the first point layer through bothgp.runand the Tools pane’s background path. Both paths report a named missing layer, and Buffer still reports its missing required input. These tests use the repository’s plugin fixture.Full local
cargo xtask cipassed test hygiene, formatting and workspace Clippy, then stopped inrustgis-data. The data library suite had 2,144 passed, 1 failed and 11 ignored. The failing test,source::external::tests::timeout_returns_while_a_grandchild_holds_the_pipes, reported “the pipe-holder must finish after release” atcrates/data/src/source/external.rs:556.UI evidence
No visible UI change.
Related issue
Closes #3561
Codex assisted with the implementation, tests, and PR description.
Summary by CodeRabbit