Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipcheck: Drop the "Rust (New)" implementation #318

Merged
merged 1 commit into from
Jan 21, 2024
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
7 changes: 5 additions & 2 deletions tools/ipcheck/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# IP Check

Created for https://github.com/rust-lang/rust/pull/76098
Originally created for https://github.com/rust-lang/rust/pull/76098, the tool now tests
the *current* implementation of various helper methods against other programming languages.

This is a little utility program for checking the behavior of various language's IP address implementations.
The goal is to make sure the Rust programs are either the same or deliberately different to other languages.
Expand All @@ -11,13 +12,15 @@ This same approach might be useful for other APIs that have externally specified

These live under the `impls` directory.

- Rust (New) (`impls/rust`) with the behavior proposed in `#76098`
- Rust (Current) (`impls/rust_current`) with the current behavior on `nightly`
- .NET (`impls/dotnet`)
- Python (`impls/python`)
- Go (`impls/go`)
- Java (`impls/java`)

There was a Rust implementation with behavior proposed in `#76098` ("Rust (New)")
but the PR didn't go through so the implementation has been removed.

## Running

With the comparison languages available, you can run `cd host && cargo run` to compare them.
Expand Down
3 changes: 1 addition & 2 deletions tools/ipcheck/host/build/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ fn main() {
let mut impls =
std::fs::File::create("../artifacts/.impls").expect("failed to create .impls file");

output_impl(&mut impls, "Rust (New)", rust::build_new());
output_impl(&mut impls, "Rust (Current)", rust::build_current());
output_impl(&mut impls, "Rust", rust::build_current());
output_impl(&mut impls, ".NET", dotnet::build());
output_impl(&mut impls, "Python", python::build());
output_impl(&mut impls, "Go", go::build());
Expand Down
4 changes: 0 additions & 4 deletions tools/ipcheck/host/build/rust.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
use std::path::Path;

pub fn build_new() -> std::io::Result<String> {
build_bin("../impls/rust_new", "../artifacts/rust_new", "ipcheck_new")
}

pub fn build_current() -> std::io::Result<String> {
build_bin(
"../impls/rust_current",
Expand Down
2 changes: 1 addition & 1 deletion tools/ipcheck/host/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use serde_json::{Map, Value};
use std::{collections::BTreeSet, fmt::Write, io::BufRead, net::IpAddr};

const REF_LANG: &'static str = "Rust (New)";
const REF_LANG: &'static str = "Rust";

fn is_ref(lang: &str) -> bool {
lang.starts_with("Rust")
Expand Down
3 changes: 1 addition & 2 deletions tools/ipcheck/impls/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Programs that accept as input a ASCII-encoded IP address to parse and run operations on. As output, these programs produce a JSON object.

## Implementations
- Rust (`rust_*`) (with the behavior specified in https://github.com/rust-lang/rust/pull/76098 as `rust_new`)
- Rust (`rust`)
- .NET (`dotnet`)
- Python (`python`)
- Go (`go`)
- Java (`java`)

2 changes: 0 additions & 2 deletions tools/ipcheck/impls/rust_new/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions tools/ipcheck/impls/rust_new/Cargo.toml

This file was deleted.

138 changes: 0 additions & 138 deletions tools/ipcheck/impls/rust_new/main.rs

This file was deleted.