Fun With Rust Issues
With the release of Rust 0.5, I polished up a little analysis of issues using R and the github issue API.
I initially downloaded the data with python script; I almost figured out how to do it with R before deciding that wasn't really the point of this exercise. So I polished up the python script a bit instead; see rustrate if you're curious.
JSON to Dataframe
To convert the JSON data from the github API to an R dataframe:
issue.data <- function(file) {
require("rjson")
issue.object.list <- fromJSON(file = file)
data.frame(number = field(issue.object.list, "number"), title = field(issue.object.list,
"title"), created_at = as.POSIXct(field(issue.object.list, "created_at")),
closed_at = as.POSIXct(field(issue.object.list, "closed_at")), stringsAsFactors = FALSE,
row.names = "number")
}
field <- function(l, n) {
as.vector(sapply(l, function(i) {
x <- i[[n]]
ifelse(is.null(x), NA, x)
}))
}
Plotting Issues Over Time
To get a count of open issues vs. time and plot it:
open.at <- function(d) {
open <- data.frame(sign = 1, t = d$created_at)
close <- data.frame(sign = -1, t = d$closed_at[!is.na(d$closed_at)])
both <- rbind(open, close)
both <- both[order(both$t), ]
both$open <- cumsum(both$sign)
both
}
plot.issues <- function(both, main, pch = 3, other = NULL, other.pch = NULL) {
both$color = "blue"
if (!is.null(other)) {
other$color = "green"
both <- rbind(both, other)
}
with(both, plot(open ~ t, xaxt = "n", col = both$color, pch = 20, new = new,
main = main, xlab = "", ylab = "issues"))
atx <- seq(min(both$t), max(both$t), by = 7 * 24 * 60 * 60)
axis(1, at = atx, labels = format(atx, "%b\n%d"), padj = 0.5)
}
Rust 0.5 Issues
So let's try it with 0.5 issues:
d5 <- issue.data(file = "rust-issues5.json")
## Loading required package: rjson
## Warning: incomplete final line found on 'rust-issues5.json'
head(d5)
## title created_at
## 859 Switch from SHA-1 to MD4 or something else cheap 2011-08-23
## 1107 Document pattern ranges 2011-11-01
## 1242 #[cfg_attr] 2011-12-01
## 1498 convert shape code to be visitor glue 2012-01-12
## 2123 Reported path for unresolved named imports is wrong 2012-04-04
## 2176 Remove the difference between .rc and .rs files 2012-04-09
## closed_at
## 859 2012-07-30
## 1107 2012-12-07
## 1242 2012-04-05
## 1498 2012-12-07
## 2123 2012-12-07
## 2176 2012-12-05
plot.issues(open.at(d5), main = "Rust 0.5 Open Issues", pch = 20)
Rust 0.4 Issues
Contrast with:
d4 <- issue.data(file = "rust-issues4bis.json")
## Warning: incomplete final line found on 'rust-issues4bis.json'
plot.issues(open.at(d4), main = "Rust 0.4 Open Issues", pch = 21)
Together
plot.issues(open.at(d4), main = "Rust 0.4, 0.5 Open Issues", pch = 21, other = open.at(d5),
other.pch = 20)
What have you done for me lately?
Finally, let's look at the 100 most recently closed 0.5 issues.
d5 <- d5[order(-as.numeric(d5$closed_at)), ]
options(width = 200)
print(head(d5[, c("closed_at", "title")], 100), right = FALSE, max.levels = NULL)
## closed_at title
## 4217 2012-12-21 0.5 doc pass
## 3109 2012-12-18 crash when logging tuple with bare strings
## 3199 2012-12-18 Remove old closure type syntax
## 4117 2012-12-18 Teach the parser to associate the mod hierarchy in a file with directories
## 4152 2012-12-18 LLVM assert with explicit self and objects
## 4090 2012-12-17 Update docs for crate file changes
## 3724 2012-12-14 Move out of self doesn't work
## 3886 2012-12-14 document "/&" syntax
## 3901 2012-12-14 Mention in the reference manual that types and modules share the same namespace
## 4135 2012-12-14 run-pass/trait-inheritance-overloading-xc-exe fails
## 4136 2012-12-14 src/test/run-pass/stat.rs fails pretty-printing
## 4140 2012-12-14 xfailed three tests
## 3516 2012-12-13 Remove # extension syntax
## 3788 2012-12-13 Document pub use foo::*
## 4097 2012-12-13 Static methods are not resolved under the trait name cross-crate
## 4165 2012-12-13 ICE with static methods
## 4173 2012-12-13 Paths in error messages for file modules contain dots now
## 2755 2012-12-12 RFC: Reduce lexer to a regular language
## 3637 2012-12-12 Switch the order of `pipes::stream`'s result
## 3680 2012-12-12 internal compiler error trying to match `None` against `Err(_)`
## 3763 2012-12-12 Privacy can be violated using pointers
## 3515 2012-12-11 Remove class-related code from the compiler
## 3561 2012-12-11 impl f64 : Eq
## 3574 2012-12-11 ICE matching borrowed strings
## 3577 2012-12-11 Tutorial needs to introduce Option
## 3578 2012-12-11 Tutorial needs brief intro to module syntax early
## 3766 2012-12-11 Problems with destructuring structs with a path to a submodule
## 3786 2012-12-11 Cross-crate static methods in anonymous traits
## 4132 2012-12-10 Vector impls don't work well with explicit self
## 2817 2012-12-09 Confusing error when using do instead of for
## 3155 2012-12-09 cross-crate impl of reexported trait isn't resolved
## 2822 2012-12-08 rustc complains with -L.
## 2995 2012-12-08 casting between region and unsafe ptr is unsound
## 1107 2012-12-07 Document pattern ranges
## 1498 2012-12-07 convert shape code to be visitor glue
## 2123 2012-12-07 Reported path for unresolved named imports is wrong
## 2216 2012-12-07 Labeled break and continue
## 2616 2012-12-07 Trait inheritance/composition
## 2794 2012-12-07 complete default methods for traits
## 2877 2012-12-07 make install on top of an already installed rust results in breakage
## 2882 2012-12-07 Decide whether src/test/pretty/block-arg-disambig is necessary
## 2889 2012-12-07 Include correct files in rust_abi on Windows
## 2981 2012-12-07 Treatment of bound / free regions is wrong
## 3026 2012-12-07 LLVM failure compiling borrow
## 3052 2012-12-07 LLVM assert with simple closures
## 3059 2012-12-07 RFC: Infer the type of float literals
## 3130 2012-12-07 Remove iter::timesi
## 3154 2012-12-07 ICE with polymorphic regioned struct
## 3157 2012-12-07 @trait, ~trait, and &trait should be supported
## 3296 2012-12-07 Remove old syntax for structs implementing a trait
## 3311 2012-12-07 unwrap fails when Option with struct containing unique box is passed with + mode
## 3325 2012-12-07 Mysterious error in flate.rs
## 3338 2012-12-07 document common enum fields
## 3389 2012-12-07 Compiler runs out of stack
## 3424 2012-12-07 unused arguments vs borrowed pointers
## 3434 2012-12-07 There should be some way to generate default implementations of the cmp::Eq and cmp::Ord traits (deriving?).
## 3500 2012-12-07 pattern matching on a reference to an enum results in an llvm broken module error
## 3528 2012-12-07 Wrong mode for main() argument causes LLVM assertion failure
## 3541 2012-12-07 Tag 0.3.1
## 3559 2012-12-07 HashMap ICE
## 3579 2012-12-07 Tutorial should probably discuss constants
## 3702 2012-12-07 LLVM assertion failure with nested trait
## 4092 2012-12-07 LLVM assertion failure when calling insert on a std::map::Hashmap<(@str, T), T>
## 4127 2012-12-07 Fix type_use on 32-bit platforms
## 2892 2012-12-06 Make a copy constructor for the data class in rust_shape
## 2894 2012-12-06 Make dynamic_size_of call size_of in rust_shape
## 3004 2012-12-06 Unhelpful resolve failure
## 3006 2012-12-06 Unhelpful error for different impl method signature vs trait
## 3061 2012-12-06 Add drop intrinsic trait
## 3135 2012-12-06 Non exported enum variants can be imported from other crates
## 4054 2012-12-06 32-bit rustc data corruption
## 4108 2012-12-06 XC inlining of static methods
## 2176 2012-12-05 Remove the difference between .rc and .rs files
## 3582 2012-12-04 &*x should crash if x is a null, unsafe ptr
## 3592 2012-12-04 Mysterious ICE when compiling servo in test mode
## 3625 2012-12-04 External ABI by-value parameter can't be demoded
## 3648 2012-12-04 Throw away the AST and side tables before running LLVM passes and linking
## 3654 2012-12-04 Function items don't pretty-print visibility correctly
## 3669 2012-12-04 big regression in std-smallintmap from turning off legacy modes
## 3711 2012-12-04 Compile Install Fails.
## 3744 2012-12-04 Bug in generic trait implementation?
## 3745 2012-12-04 Borrowing mutable vector subslices
## 3781 2012-12-04 error: unresolved name: core::error
## 3790 2012-12-04 ICE when using + or - instead of named methods of Num
## 3819 2012-12-04 time::rfc822, rfc822z, rfc3339 should be pure
## 3840 2012-12-04 core::unit should be called core::nil
## 3865 2012-12-04 explicit self and object types (trait types) are incompatible
## 3884 2012-12-04 Typedefs and static methods do not work together
## 3900 2012-12-04 Mention in the reference manual that types and modules share the same namespace
## 3934 2012-12-04 Can't use symbolic enum in struct constant
## 3957 2012-12-04 Make sure that derivable methods actually have derivable signatures
## 3982 2012-11-29 overlapping instances should be detected for inherited traits
## 4006 2012-11-29 'privileged scope' coherence checks must extend to trait supertypes
## 4017 2012-11-29 getopts copy parameters
## 4030 2012-11-29 File reading test fails on Windows
## 4056 2012-11-29 trait inheritance and kinds
## 3683 2012-11-24 Default methods seem not to be able to call self yet
## 3280 2012-11-20 document #fmt
## 3336 2012-11-20 document repeated vectors
## 3337 2012-11-20 document ref