Skip to content

Commit

Permalink
Remove the pipes compiler
Browse files Browse the repository at this point in the history
The pipes compiler produced data types that encoded efficient and safe
bounded message passing protocols between two endpoints. It was also
capable of producing unbounded protocols.

It was useful research but was arguably done before its proper time.

I am removing it for the following reasons:

* In practice we used it only for producing the `oneshot` and `stream`
  unbounded protocols and all communication in Rust use those.
* The interface between the proto! macro and the standard library
  has a large surface area and was difficult to maintain through
  language and library changes.
* It is now written in an old dialect of Rust and generates code
  which would likely be considered non-idiomatic.
* Both the compiler and the runtime are difficult to understand,
  and likewise the relationship between the generated code and
  the library is hard to understand. Debugging is difficult.
* The new scheduler implements `stream` and `oneshot` by hand
  in a way that will be significantly easier to maintain.

This shouldn't be taken as an indication that 'channel protocols'
for Rust are not worth pursuing again in the future.
  • Loading branch information
brson committed Aug 1, 2013
1 parent 7daea7c commit 4b3e766
Show file tree
Hide file tree
Showing 23 changed files with 3 additions and 2,369 deletions.
6 changes: 2 additions & 4 deletions src/libsyntax/ext/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ pub enum SyntaxExtension {
// An IdentTT is a macro that has an
// identifier in between the name of the
// macro and the argument. Currently,
// the only examples of this are
// macro_rules! and proto!
// the only examples of this is
// macro_rules!

// perhaps macro_rules! will lose its odd special identifier argument,
// and this can go away also
Expand Down Expand Up @@ -197,8 +197,6 @@ pub fn syntax_expander_table() -> SyntaxEnv {
syntax_expanders.insert(intern(&"module_path"),
builtin_normal_tt(
ext::source_util::expand_mod));
syntax_expanders.insert(intern(&"proto"),
builtin_item_tt(ext::pipes::expand_proto));
syntax_expanders.insert(intern(&"asm"),
builtin_normal_tt(ext::asm::expand_asm));
syntax_expanders.insert(
Expand Down
63 changes: 0 additions & 63 deletions src/libsyntax/ext/pipes/ast_builder.rs

This file was deleted.

82 changes: 0 additions & 82 deletions src/libsyntax/ext/pipes/check.rs

This file was deleted.

106 changes: 0 additions & 106 deletions src/libsyntax/ext/pipes/liveness.rs

This file was deleted.

84 changes: 0 additions & 84 deletions src/libsyntax/ext/pipes/mod.rs

This file was deleted.

Loading

5 comments on commit 4b3e766

@bors
Copy link
Contributor

@bors bors commented on 4b3e766 Aug 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pcwalton
at brson@4b3e766

@bors
Copy link
Contributor

@bors bors commented on 4b3e766 Aug 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging brson/rust/nopipes = 4b3e766 into auto

@bors
Copy link
Contributor

@bors bors commented on 4b3e766 Aug 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brson/rust/nopipes = 4b3e766 merged ok, testing candidate = eb5743b

@bors
Copy link
Contributor

@bors bors commented on 4b3e766 Aug 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = eb5743b

Please sign in to comment.