Skip to content

Commit

Permalink
Remove public Rust API (#2709)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored Feb 10, 2023
1 parent 9a018c1 commit ac6c3af
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 78 deletions.
8 changes: 8 additions & 0 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Breaking Changes

## 0.0.245

### Ruff's public `check` method was removed ([#2709](https://github.com/charliermarsh/ruff/pull/2709))

Previously, Ruff exposed a `check` method as a public Rust API. This method was used by few,
if any clients, and was not well documented or supported. As such, it has been removed, with
the intention of adding a stable public API in the future.

## 0.0.238

### `select`, `extend-select`, `ignore`, and `extend-ignore` have new semantics ([#2312](https://github.com/charliermarsh/ruff/pull/2312))
Expand Down
19 changes: 8 additions & 11 deletions crates/ruff/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
//!
//! [Ruff]: https://github.com/charliermarsh/ruff
use cfg_if::cfg_if;
pub use rule_selector::RuleSelector;
pub use rules::pycodestyle::rules::IOError;
pub use violation::{AutofixKind, Availability as AutofixAvailability};

mod assert_yaml_snapshot;
mod ast;
mod autofix;
Expand Down Expand Up @@ -34,20 +39,12 @@ mod vendor;
mod violation;
mod visibility;

use cfg_if::cfg_if;
pub use rule_selector::RuleSelector;
pub use rules::pycodestyle::rules::IOError;
pub use violation::{AutofixKind, Availability as AutofixAvailability};

cfg_if! {
if #[cfg(not(target_family = "wasm"))] {
pub mod packaging;

mod lib_native;
pub use lib_native::check;
} else {
if #[cfg(target_family = "wasm")] {
mod lib_wasm;
pub use lib_wasm::check;
} else {
pub mod packaging;
}
}

Expand Down
67 changes: 0 additions & 67 deletions crates/ruff/src/lib_native.rs

This file was deleted.

0 comments on commit ac6c3af

Please sign in to comment.