open-rmf / mapf

Multi-agent (path finding) planning framework
Apache License 2.0
53 stars 5 forks source link

[Bug]: `#![feature]` may not be used on the stable release channel Build Error #24

Closed cardboardcode closed 4 hours ago

cardboardcode commented 5 hours ago

Before proceeding, is there an existing issue or discussion for this?

OS and version

Ubuntu 22.04

Open-RMF installation type

Binaries

Other Open-RMF installation methods

No response

Open-RMF version or commit hash

Open-RMF Humble

ROS distribution

Humble

ROS installation type

Binaries

Other ROS installation methods

No response

Package or library, if applicable

No response

Description of the bug

Thank you for creating and maintaining this codebase. This issue is to make it easier for future developers who may encounter the error shown below when attempting to build mapf cargo package using the nightly toolchain of Rust as of this writing on 27th Oct 2024.

Encountered a similar build error as highlighted in #12 as shown below:

error[E0554]: `#![feature]` may not be used on the stable release channel
  --> mapf/src/lib.rs:17:1
   |
17 | / #![feature(
18 | |     associated_type_bounds,
19 | |     type_alias_impl_trait,
20 | |     impl_trait_in_assoc_type,
21 | |     result_flattening
22 | | )]
   | |__^
   |
   = help: the feature `associated_type_bounds` has been stable since `1.79.0` and no longer requires an attribute to enable

Steps to reproduce the bug

  1. Download the repository:
cd $HOME
git clone git@github.com:open-rmf/mapf.git --branch main --single-branch --depth 1
cd mapf
  1. Install rustup:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Build using rustup:

rustup default nightly
  1. Build and run mapf:
    cargo run --release --example grid -- mapf-viz/scenarios/sizes.yaml

Expected behavior :green_circle:

The cargo run command completes successfully with a similar output:

warning: `mapf` (lib) generated 2 warnings (run `cargo fix --lib -p mapf` to apply 1 suggestion)
    Finished `release` profile [optimized] target(s) in 0.17s
     Running `target/release/examples/grid mapf-viz/scenarios/sizes.yaml`
Saving backup file mapf-viz/scenarios/sizes.yaml.backup
[mapf/src/negotiation/mod.rs:185:9] count = 0
[mapf/src/negotiation/mod.rs:213:21] iters = 10
Culled 0
Successful planning took 0.006446495 seconds
[mapf-viz/examples/grid.rs:1189:9] node_history.len() = 19

The window showing successful path-planning appears similar to below: image

Actual behavior :red_circle:

The cargo run command fails with the error highlighted above.

cardboardcode commented 4 hours ago

Closed the issue after successful build after running the rustup default nightly again.