Skip to content

Commit

Permalink
Use Internal call rather than compiled code for the namespace registry (
Browse files Browse the repository at this point in the history
#1283)

* Use Internal call rather than compiled code for the namespace registry

* Modify README

* More helpful error message
  • Loading branch information
jimhester authored and hadley committed Aug 19, 2016
1 parent 720943f commit e6ad9b5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 27 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Expand Up @@ -209,4 +209,3 @@ importFrom(utils,modifyList)
importFrom(utils,packageDescription)
importFrom(utils,packageVersion)
importFrom(utils,remove.packages)
useDynLib(devtools,nsreg)
1 change: 1 addition & 0 deletions R/build-github-devtools.r
Expand Up @@ -32,6 +32,7 @@
#' }
#' @export
build_github_devtools <- function(outfile = NULL) {
.Deprecated(msg = "`build_github_devtools()` is deprecated, you can simply use `install_github(\"hadley/devtools\")`")
if (!has_devel()) {
stop("This requires a working development environment.")
}
Expand Down
6 changes: 3 additions & 3 deletions R/namespace-env.r
Expand Up @@ -175,11 +175,11 @@ is_loaded <- function(pkg = ".") {


# Returns the namespace registry
#' @useDynLib devtools nsreg
ns_registry <- function() {
.Call(nsreg)
(get(".Internal", envir = baseenv(), mode = "function"))(getNamespaceRegistry())
}

# To avoid a note about getNamespaceRegistry being missing
utils::globalVariables("getNamespaceRegistry")

# Register a namespace
register_namespace <- function(name = NULL, env = NULL) {
Expand Down
18 changes: 1 addition & 17 deletions README.md
Expand Up @@ -27,28 +27,12 @@ You can track (and contribute to) the development of `devtools` at https://githu
* **Mac**: Install Xcode from the Mac App Store.
* **Linux**: Install a compiler and various development libraries (details vary across different flavors of Linux).

3. Follow the instructions below depending on platform.

* **Mac and Linux**:
3. Install the development version of devtools.

```R
devtools::install_github("hadley/devtools")
```

* **Windows**:

```R
library(devtools)
build_github_devtools()

#### Restart R before continuing ####
install.packages("devtools.zip", repos = NULL, type = "source")

# Remove the package after installation
unlink("devtools.zip")
```


## Package development tools

All `devtools` functions accept a path as an argument, e.g. `load_all("path/to/path/mypkg")`. If you don't specify a path, `devtools` will look in the current working directory - this is recommended practice.
Expand Down
6 changes: 0 additions & 6 deletions src/devtools.c

This file was deleted.

0 comments on commit e6ad9b5

Please sign in to comment.