Code Monkey home page Code Monkey logo

focus's Introduction

Focused Development

focus is a tool to manage Git sparse checkouts derived from the Bazel build graph.

Installation

focus is written in Rust and supports macOS and Linux. Git v2.35+ and Bazel need to be installed in the PATH env. General

MacOS Prerequisites

Install Bazel

Install Git > 2.35

Warning: If you run a cargo test you may run out of file descriptors. On MacOS you will need to use ulimit -n X to set a large file limit for the current shell. On macOS Big Sur, you can write a plist to do this permanently:

Write the following to a file named /Library/LaunchDaemons/limit.maxfiles.plist (hint: you'll need to invoke your editor with sudo because this file is protected):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
    <dict>
      <key>Label</key>
        <string>limit.maxfiles</string>
      <key>ProgramArguments</key>
        <array>
	  <string>sudo</string>
          <string>launchctl</string>
          <string>limit</string>
          <string>maxfiles</string>
          <string>655360</string>
          <string>1048576</string>
        </array>
      <key>RunAtLoad</key>
        <true />
    </dict>
  </plist>

then load it with sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist. This seems to work better if you restart your Mac.

Note: these instructions are from a GitHub issue gradle/gradle#17274. Thanks to those folks.

Linux Prerequisites

Install Git: Git 2.35+: get this through your distro's package manager or download pre-built binaries or sources here.

Install Bazel: You'll need Bazel installed. See these instructions for details on how to install on mainstream Linux distros. Alternative distros probably have a reasonable Bazel package available by now.

Common

Install Rust, then install focus with

$ cargo install --locked --git https://github.com/twitter/focus

Usage

If you are the repository administrator, first configure focus for your repo using the Administration instructions.

For end-users, see Usage for instructions on how to use focus to manage your sparse checkouts.

For new or curious users, see Bazel Tutorial for instructions on how to try focus on the bazel repository itself.

Design

See various design documents at https://github.com/twitter/focus/tree/main/focus/doc. Focus was presented at Git Merge 2022; see the slides here.

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.