Git Product home page Git Product logo

crowbot's Introduction

The Servo Parallel Browser Engine Project

Servo is a prototype web browser engine written in the Rust language. It is currently developed on 64-bit macOS, 64-bit Linux, 64-bit Windows, and Android.

Servo welcomes contribution from everyone. See CONTRIBUTING.md and HACKING_QUICKSTART.md for help getting started.

Visit the Servo Project page for news and guides.

Getting Servo

git clone https://github.com/servo/servo
cd servo
  • Your CARGO_HOME needs to point to (or be in) the same drive as your Servo repository (#28530).
  • The Servo repository is big! If you have an unreliable network connection, consider making a shallow clone.

Build Setup

If these instructions fail or you would like to install dependencies manually, try the manual build setup.

macOS

  • Ensure that the version showed by python --version is >= 3.10:
  • Install Xcode
  • Install Homebrew
  • Run curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Run ./mach bootstrap
    Note: This will install the recommended version of GStreamer globally on your system.

Linux

  • Run curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Install Python (version >= 3.10):
    • Debian-like: Run sudo apt install python3-pip python3-venv
    • Fedora: Run sudo dnf install python3 python3-pip python3-devel
    • Arch: Run sudo pacman -S --needed python python-pip
    • Gentoo: Run sudo emerge dev-python/pip
  • Run ./mach bootstrap

Windows

  • Download and run rustup-init.exe
  • Make sure to select Quick install via the Visual Studio Community installer or otherwise install Visual Studio 2022.
  • In the Visual Studio Installer ensure the following components are installed for Visual Studio 2022:
    • Windows 10 SDK (10.0.19041.0) (Microsoft.VisualStudio.Component.Windows10SDK.19041)
    • MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest) (Microsoft.VisualStudio.Component.VC.Tools.x86.x64)
    • C++ ATL for latest v143 build tools (x86 & x64) (Microsoft.VisualStudio.Component.VC.ATL)
    • C++ MFC for latest v143 build tools (x86 & x64) (Microsoft.VisualStudio.Component.VC.ATLMFC)
  • Install chocolatey
  • Install Python 3.11
  • Run mach bootstrap
    • This will install CMake, Git, and Ninja via choco in an Administrator console. Allow the scripts to run and once the operation finishes, close the new console.
  • Run refreshenv

See also Windows Troubleshooting Tips.

Android

  • Ensure that the following environment variables are set:
    • ANDROID_SDK_ROOT
    • ANDROID_NDK_ROOT: $ANDROID_SDK_ROOT/ndk/25.2.9519653/ ANDROID_SDK_ROOT can be any directory (such as ~/android-sdk). All of the Android build dependencies will be installed there.
  • Install the latest version of the Android command-line tools to $ANDROID_SDK_ROOT/cmdline-tools/latest.
  • Run the following command to install the necessary components:
    sudo $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install
     "build-tools;33.0.2" \
     "emulator" \
     "ndk;25.2.9519653" \
     "platform-tools" \
     "platforms;android-33" \
     "system-images;android-33;google_apis;x86_64"

For information about building and running the Android build, see the Android documentation.

Building

Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks. You can call Mach like this:

On Unix systems:

./mach [command] [arguments]

On Windows Commandline:

mach.bat [command] [arguments]

The examples below will use Unix, but the same applies to Windows.

The Rust compiler

Servo's build system uses rustup.rs to automatically download a Rust compiler. This is a specific version of Rust Nightly determined by the rust-toolchain.toml file.

Normal build

To build Servo in development mode. This is useful for development, but the resulting binary is very slow:

./mach build --dev
./mach run tests/html/about-mozilla.html

Release build

For benchmarking, performance testing, or real-world use. Add the --release flag to create an optimized build:

./mach build --release
./mach run --release tests/html/about-mozilla.html

Android build

For an armv7 Android build run the following command.

./mach build --android

Checking for build errors, without building

If you’re making changes to one crate that cause build errors in another crate, consider this instead of a full build:

./mach check

It will run cargo check, which runs the analysis phase of the compiler (and so shows build errors if any) but skips the code generation phase. This can be a lot faster than a full build, though of course it doesn’t produce a binary you can run.

Running

Run Servo with the command:

./servo [url] [arguments] # if you run with nightly build
./mach run [url] [arguments] # if you run with mach

# For example
./mach run https://www.google.com

Commandline Arguments

  • -p INTERVAL turns on the profiler and dumps info to the console every INTERVAL seconds
  • -s SIZE sets the tile size for painting; defaults to 512
  • -z disables all graphical output; useful for running JS / layout tests
  • -Z help displays useful output to debug servo

Keyboard Shortcuts

  • Ctrl+L opens URL prompt (Cmd+L on Mac)
  • Ctrl+R reloads current page (Cmd+R on Mac)
  • Ctrl+- zooms out (Cmd+- on Mac)
  • Ctrl+= zooms in (Cmd+= on Mac)
  • Alt+left arrow goes backwards in the history (Cmd+left arrow on Mac)
  • Alt+right arrow goes forwards in the history (Cmd+right arrow on Mac)
  • Esc or Ctrl+Q exits Servo (Cmd+Q on Mac)

Runtime dependencies

Linux

  • GStreamer >=1.18
  • gst-plugins-base >=1.18
  • gst-plugins-good >=1.18
  • gst-plugins-bad >=1.18
  • gst-plugins-ugly >=1.18
  • libXcursor
  • libXrandr
  • libXi
  • libxkbcommon
  • vulkan-loader

Developing

There are lots of mach commands you can use. You can list them with ./mach --help.

The generated documentation can be found on https://doc.servo.org/servo/index.html

crowbot's People

Contributors

aaronmt avatar aneeshusa avatar avadacatavra avatar bobthekingofegypt avatar carlosmcgregor avatar edunham avatar fmarts avatar ianhibbert avatar jdm avatar jianajavier avatar jlevesy avatar jonfor avatar kichjang avatar leibovic avatar manishearth avatar manutestin avatar mbrubeck avatar michaelmera avatar mseri avatar notriddle avatar pradyunsg avatar simonsapin avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

crowbot's Issues

Is X intermittent?

It would be handy to say things like "is vertical-lr-blocks.html intermittent?" and have crowbot search for I-intermittent issues with that filename in them.

Make commands take precendence

22:52   gw  crowbot1: ping Ms2ger The changes to get the glutin build working on ubuntu 12.04 have landed (it works on my old 12.04 laptop and 12.04 VM now). please let me know if that fixes the issues on your machine
22:52   crowbot1    gw: Try looking at our readme: https://github.com/servo/servo/#prerequisites

Triage helper

We could have crowbot return a random issue to triage (ie. is this issue still valid?), or just the least recently modified issue in the database.

Ignore github links with content after the numbers

15:43 <jdm> Savago: I'm talking about https://github.com/servo/servo/pull/5366/files#diff-90a6391c1c7c20ffbfca3665f13cd657R490
15:43 <crowbot> PR #5366: Load a placeholder when a url to an image is broken. - https://github.com/servo/servo/pull/5366

NodeJS version

Is there any reason to use 0.10.x ? The current version is v6.2.2. It provides better ES6 support along with improved performance and bug fixes.

Distinguish between PR and issue bare numbers

When you type a whole link into IRC, this happens

you> https://github.com/servo/servo/pull/14707
crowbot> PR #14707: Pipeline documentation comments - https://github.com/servo/servo/pull/14707

But if you just type the number in, you get

you> #14707
crowbot> Issue #14707: Pipeline documentation comments - https://github.com/servo/servo/pull/14707

This is dumb. Crowbot has enough information to tell that it's a PR, based on the URL it put in to IRC (also, the GitHub API has a "pull_request" JSON key, so crowbot really doesn't need to parse the URL at all).

Make unassigned PRs link to PR view instead of API

09:15 <crowbot1> add `faster` flag to `./mach test` command : https://api.github.com/repos/servo/servo/issues/9273

That links is not as useful as it could be :)

From https://developer.github.com/v3/issues/:

Note: In the past, pull requests and issues were more closely aligned than they are now. As far as the API is concerned, every pull request is an issue, but not every issue is a pull request.

This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key.

Add a memory bank for This Week in Servo notes

We often notice things that should be noted in TWiS but forget to include them when the time comes. Let's add a command that remembers a phrase and who said it, another command that spits them all out, and a third command that clears the existing set of notes.

Add persistence for ping messages

The bot gets restarted by heroku at least every 24 hours, so we sometimes drop pending messages. We should write a file of pending pings and read it in at startup.

Make crowbot testable

There have been some regressions recently because crowbot has grown organically and it's hard to test everything. We should refactor the bot to separate the interaction with the IRC library from the actual handlers, which would allow us to write automated tests that verify that everything behaves as expected. I imagine the handler function could accept a say argument which would be a function to be called in place of bot.say and bot.act. For the tests this could just append to an array, while for the real bot it would redirect to the appropriate methods of bot.

Don't fetch the same github issue within a certain time period

[11:16:02] <jack> tetsuharu: what was the build error on #1419 that you fixed?
[11:16:02] <crowbot> Issue #1419: Hide to initialize steps of `CompositorTask` from Servo `main` fn. - https://github.com/mozilla/servo/pull/1419
[11:17:05] <tetsuharu> @jack: no. #1419 has been rebased && succeeded.
[11:17:05] <crowbot> Issue #1419: Hide to initialize steps of `CompositorTask` from Servo `main` fn. - https://github.com/mozilla/servo/pull/1419

Add a command to notify a user when the build queue is idle

Similar to 459b4a6, sometimes we want to perform some CI maintenance when there are no active build jobs. We should add a command that pings a user the next time that the queue becomes idle (and check the queue more frequently than once an hour when someone is waiting to be pinged).

Make `help` command more useful

It currently responds with a link to the Servo documentation, but I've never seen the command used for that purpose. Users are more likely to want information about crowbot's features, so we should provide that (probably by linking to a document in this repository).

Build time ETA is unreliable

cc @carlosmcgregor

We're seeing notifications for build jobs which have only started <10 minutes ago, so it appears the ETA cannot be trusted at all. We should instead look at the start time for the running build and notify the channel if it has been running for more than 90 minutes. Additionally, we should ensure that our time comparisons take place in the PST timezone, since there's no guarantee that the current time for the bot matches the time for the build log.

Handle private messages.

It would be nice if crowbot responded to pms to allow people to experiment without cluttering the main channel.

Limit unassigned PRs output to avoid flooding

09:13 <jdm> crowbot: what prs need a reviewer?
09:13 <crowbot> add `faster` flag to `./mach test` command : https://api.github.com/repos/servo/servo/issues/9273
09:13 <crowbot> Support device-pixel-ratio in wpt reftests.: https://api.github.com/repos/servo/servo/issues/9272
09:13 <crowbot> Add build-essential to Debian based Linuxes' requirements: https://api.github.com/repos/servo/servo/issues/9264
09:13 <crowbot> mozbrowsersecuritychange event: https://api.github.com/repos/servo/servo/issues/9244
09:13 belew.mozilla.org has kicked crowbot (Channel flood triggered (limit is 5 lines in 3 secs))

We should do this on a timer so it's one every second or something.

Add a command to fetch a random assigned easy issue

Specifically, I'd like to say something like "crowbot: what issue should I poke?" and get back a random issue that:

  • either has the E-easy or E-less easy label applied
  • has the C-assigned label applied
  • has not been updated in at least 14 days
    This should be possible to do using the existing findIssue function by passing the appropriate github API arguments (see the command for reviewing a PR for an example).

TravisCI is broken

We're using an old version of node that doesn't like some of the newer syntax in the newsflash module.

Handle issue/PR links of the form `servo/saltfs#123`

Crowbot currently will turn issue references like #123 (and £123) into links to the main Servo repo. It would be nice if this also worked for other repositories since we use a bunch of repos, with the syntax in the issue title.

Add a command to find unassigned PRs

We use the assignee for a PR in servo/servo to indicate who is responsible for reviewing the changes. We should add a command that finds all of the PRs with no assignee and reports the title and url, one per line.

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.