Code Monkey home page Code Monkey logo

dotfiles-rs's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar jokeyrhyme avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dotfiles-rs's Issues

whole process panics and terminates if HTTP request fails

We need to start handling errors better:

  • use ? and return Result<> types in more places, instead of using .expect() or .unwrap()
  • tasks' sync() and update() should not return Result<>s, but should gracefully handle such values

pkg: nodejs: sync always installs all packages unnecessarily

Should probably call npm ls --global --depth=0 --json instead of without the --json

example output with something installed:

{
  "dependencies": {
    "clipboard-cli": {
      "version": "1.1.0",
      "from": "clipboard-cli",
      "resolved": "https://registry.npmjs.org/clipboard-cli/-/clipboard-cli-1.1.0.tgz"
    }
}

example output with nothing installed:

{}

rust: handle rustup-based rustfmt installation/transition better

  • ensure rustfmt is not installed via cargo, and cargo does not think rustfmt is installed

    • this can be covered with cargo uninstall rustfmt rustfmt-preview
  • ensure rustup is updated

    • with rustup self update
  • ensure rustup has installed and is managing rustfmt

    • with rustup component remove rustfmt; rustup component add rustfmt
  • all of the above can be tested by seeing if cargo install --list includes rustfmt (it should not) and if cargo fmt --help has a success exit code

0.9.0 can't build for Windows

   Compiling jokeyrhyme-dotfiles v0.9.0
error[E0433]: failed to resolve. Use of undeclared type or module `std`
 --> src\tasks\windows.rs:9:5
  |
9 |     std::fs::create_dir_all(&bin).expect(&format!(
  |     ^^^ Use of undeclared type or module `std`

error[E0425]: cannot find value `parent` in this scope
  --> src\tasks\windows.rs:11:10
   |
11 |         &parent.display()
   |          ^^^^^^ not found in this scope

error[E0308]: mismatched types
  --> src\utils\fs.rs:56:5
   |
55 | pub fn set_executable(target: &Path) -> std::io::Result<()> {
   |                                         ------------------- expected `std::result::Result<(), std::io::Error>` because of return type
56 |     Ok
   |     ^^ expected enum `std::result::Result`, found fn item
   |
   = note: expected type `std::result::Result<(), std::io::Error>`
              found type `fn(_) -> std::result::Result<_, _> {std::result::Result<_, _>::Ok}`

error: aborting due to 3 previous errors

`Result::unwrap()` panic during failed connections

HTTP/1.1 200 GET https://nodejs.org:443/dist/index.json
thread 'main' panicked at 'called Result::unwrap() on an Err value: IOError("A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (os error 10060)")', libcore\result.rs:945:5
note: Run with RUST_BACKTRACE=1 for a backtrace.

use GitHub token when available, use with Travis CI

  • builds are failing due to API rate limit
test utils::github::tests::latest_release_github_hub ... FAILED
test tasks::rust::tests::test_cargo_latest_version ... ok
failures:
---- utils::github::tests::latest_release_github_hub stdout ----
	HTTP 403 https://api.github.com/repos/github/hub/releases
headers: {"connection": "close", "status": "403 Forbidden", "x-github-request-id": "DDB8:0D44:C15F36:1E6B8C7:5ACBC36B", "content-type": "application/json; charset=utf-8", "x-content-type-options": "nosniff", "content-security-policy": "default-src \'none\'", "x-ratelimit-reset": "1523305877", "date": "Mon, 09 Apr 2018 19:47:56 GMT", "x-ratelimit-limit": "60", "x-ratelimit-remaining": "0", "access-control-expose-headers": "ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "x-runtime-rack": "0.021397", "server": "GitHub.com", "referrer-policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "x-frame-options": "deny", "content-length": "247", "access-control-allow-origin": "*", "x-github-media-type": "github.v3; format=json", "x-xss-protection": "1; mode=block", "strict-transport-security": "max-age=31536000; includeSubdomains; preload"}
{"message":"API rate limit exceeded for 34.233.56.198. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://developer.github.com/v3/#rate-limiting"}
thread 'utils::github::tests::latest_release_github_hub' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: StringError("non-success") }', libcore/result.rs:945:5

should not consider alpha/beta/rc/etc to be latest stable release

  • when retrieving Release information from GitHub, we currently rely on GitHub Release metadata to filter out non-stable releases
  • we should also check for certain strings within the version in order to filter out non-stable releases: e.g. alpha, beta, canary, preview, rc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.