mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
Page:
Workweek compiler lints
Pages
Adding a new WebIDL binding
Alternative Logo Proposals and Related Swag
Asynchronous WebAssembly compilation project
Austin Oxidation
Autogeneration of style structs
Basic SVG support project
Beginner's guide to rebasing and squashing
Benchmarking
Benchmarks
Bots
Browser Engine Research
Build Errors FAQ
Buildbot administration
Building for Android
Building for Magic Leap
Building for UWP
Building on ARM desktop Linux
Building
CI Services we use
CSS parse error reporting
CSSOM student project
Canvas rendering project
Cargo upgrade service project
Code rust concurrency
Code Review
Code of Conduct
Coding standards
Compiler upgrade recipes
Compositor Layer Design
Contributing
Control Servo using WebDriver
Creating and viewing WARC web archives in Servo
Creating new OpenSSL Windows binary distributions
Cross compiling from linux to mac
Crowbot
Css selector matching meeting 2013 07 19
DOM Design
DOM documentation
DOM missing pieces
Debugging JS web compat issues
Debugging and editing tools
Debugging
Design
Developer tools student project
Devtools CSS errors
Devtools plans
Devtools
Diagnosing SpiderMonkey JIT issues
Eric Atkinson visit 2013 09 10
Events and sundry
Expand HTTP request response monitoring
Fetch improvement project
Firefox Reality release notes
FirefoxReality build
Firewall setup for servo master1
Focus student project
Form validation student project
GSoC project brainstorming
Garbage collected DOM
Getting started with layout
GitHub Labels
Github & Critic PR handling 101
Github workflow
Glossary
Governance
Graphics toolkit integration
HTML parser improvement project
HTMLElement binding conversion
HTTP archive support project
HTTP library requirements
Hawaii Rooting
High priority content for layout
Highfive
HoloLens 2 test plan
Home
How to generate GStreamer binaries for CI
Image load conformance student project
Image maps project
Implement HTML charset parsing project
Implement ImageBitmap project
Implement missing WebAudio automation student project
Implement support for missing XMLHttpRequest APIs
Implement worker modules
Implementing a web standard (RGSoC)
Improve specification conformance of unicode bidi library
Incremental flow tree construction
Infrastructure
Integrate xml5ever
Intern project brainstorming
Intern projects
JS objects, wrappers, and cross origin concerns 2013 08 07
Layout 2020
Layout Overview
Layout resources
Layout revamp ideas
Leo meyerovich visit 2013 07 22
Linux sandboxing
London Oxidation
London Security
Meeting 2014 10 27
Meeting 2014 12 08
Meeting 2012 02 08
Meeting 2012 02 16
Meeting 2012 07 20
Meeting 2013 04 01
Meeting 2013 04 15
Meeting 2013 04 22
Meeting 2013 04 29
Meeting 2013 05 06
Meeting 2013 05 13
Meeting 2013 05 20
Meeting 2013 06 03
Meeting 2013 06 10
Meeting 2013 06 14
Meeting 2013 06 17
Meeting 2013 06 24
Meeting 2013 07 01
Meeting 2013 07 15
Meeting 2013 07 22
Meeting 2013 07 29
Meeting 2013 08 05
Meeting 2013 08 12
Meeting 2013 08 19
Meeting 2013 09 09
Meeting 2013 09 16
Meeting 2013 09 23
Meeting 2013 09 30
Meeting 2013 10 14
Meeting 2013 10 21
Meeting 2013 10 28
Meeting 2013 11 04
Meeting 2013 11 18
Meeting 2013 11 25
Meeting 2013 12 02
Meeting 2013 12 09
Meeting 2013 12 16
Meeting 2014 01 06
Meeting 2014 01 13
Meeting 2014 01 21
Meeting 2014 01 27
Meeting 2014 02 03
Meeting 2014 02 10
Meeting 2014 02 24
Meeting 2014 03 10
Meeting 2014 03 17
Meeting 2014 03 24
Meeting 2014 03 31
Meeting 2014 04 07
Meeting 2014 04 14
Meeting 2014 04 21
Meeting 2014 04 28
Meeting 2014 05 05
Meeting 2014 05 13
Meeting 2014 05 19
Meeting 2014 06 09
Meeting 2014 06 17
Meeting 2014 06 23
Meeting 2014 06 30
Meeting 2014 07 07
Meeting 2014 07 14
Meeting 2014 07 21
Meeting 2014 07 29
Meeting 2014 08 04
Meeting 2014 08 11
Meeting 2014 08 12
Meeting 2014 08 18
Meeting 2014 08 25
Meeting 2014 09 08
Meeting 2014 09 15
Meeting 2014 09 22
Meeting 2014 09 29
Meeting 2014 10 06
Meeting 2014 10 13
Meeting 2014 10 20
Meeting 2014 11 10
Meeting 2014 11 17
Meeting 2014 11 24
Meeting 2014 12 15
Meeting 2015 01 05
Meeting 2015 01 12
Meeting 2015 01 26
Meeting 2015 02 09
Meeting 2015 02 23
Meeting 2015 03 02
Meeting 2015 03 16
Meeting 2015 03 30
Meeting 2015 04 06
Meeting 2015 04 13
Meeting 2015 04 27
Meeting 2015 05 04
Meeting 2015 05 11
Meeting 2015 05 18
Meeting 2015 06 01
Meeting 2015 06 08
Meeting 2015 06 15
Meeting 2015 07 06
Meeting 2015 07 13
Meeting 2015 07 27
Meeting 2015 08 10
Meeting 2015 08 17
Meeting 2015 08 24
Meeting 2015 08 31
Meeting 2015 09 14
Meeting 2015 09 21
Meeting 2015 09 28
Meeting 2015 10 05
Meeting 2015 10 12
Meeting 2015 10 19
Meeting 2015 10 26
Meeting 2015 11 02
Meeting 2015 11 09
Meeting 2015 11 16
Meeting 2015 11 30
Meeting 2016 01 04
Meeting 2016 01 11
Meeting 2016 01 25
Meeting 2016 02 01
Meeting 2016 02 08
Meeting 2016 02 22
Meeting 2016 03 07
Meeting 2016 03 21
Meeting Devtools Servo 2
Meetings
Microdata project
Minutes Hackathon 2012 03 27
Missing DOM features project
More ServiceWorker support project
More developer tools student project
Mozlandia Automation
Mozlandia B2S
Mozlandia JS
Mozlandia Rust In Gecko
Mozlandia WPT
Mozlandia gfx
Mozlando Devtools Servo
Mozlando Oxidation
Mozlando SM Servo
Mozlando Servo Bluetooth
Mozlando Servo MagicDOM
Mozlando Servo SMStrings
Mutation observer project
Mutation testing project
NCSU student projects
Network security project
Off main thread HTML parsing project
Offscreen canvas improvements project
Offscreen canvas project
Orlando Oxidation 2018
Oxidation 2015 11 05
Persistent sessions student project
Preparing ARM libraries for CI
Priority of CSS properties
Priority of DOM implementation
Priority of dom bindings
Private browsing student project
Profiling
Project proposal deadlines
Prototype JS form controls student project
Prototype ways of splitting the script crate
Publishing a new ANGLE NuGet version
Publishing a new app store release
Push vs Pull for caching
Random web content project
Refactor GLES2 student project
Refactor bluetooth support student project
Remaining work
Removing push notifications from IRC hooks
Replace C libraries student project
Report new contributors project
Representation of computed style
Research
Reviewer
Roadmap
Running Web Platform Tests on Servo
Rust HTML parser
Rust SpiderMonkey debugger API
Rust cssparser code walk 2013 08 02
SaltStack Administration
San Francisco Oxidation
Servo Benchmarking Report (December 2024)
Servo Benchmarking Report (November 2024)
Servo Benchmarking Report (October 2024)
Servo Layout Engines Report
Servo and SpiderMonkey Report
Servo for Gecko Developers
Specification Links
SpiderMonkey related tasks
SpiderMonkey infodump
SpiderMonkey upgrade details
Storage student project
Streaming webassembly student project
Strings
Student project brainstorm
Student projects
Styling overview
Stylo hacking guide
Summer of Code 2014: Implement XMLHttpRequest
Summer of Code 2016: Fetch API
Summer of Code 2016: File support
Summer of Code 2016: ServiceWorker infrastructure
Summer of Code projects
Summit meeting 2013 09 09
Support WebDriver based tests project
Syncing web platform tests (WPT)
TaskCluster
Testing
Tools
Tracking intermittent failures over time project
Transcription Notes from Servo Architecture talk in Suwon
Transcription notes from rust patterns talk in suwon
Transcription parallelism
Transcription rust concurrency
Transcription rust runtime
Transription layout and acid2
Trinity College Dublin student projects
UPenn student projects
Updating the Rust compiler used by Servo
Upgrading non taskcluster linux CI machines
Upgrading the UWP gstreamer binaries
Upgrading the windows LLVM binaries
Upgrading wptrunner
Using DOM types
Using Rust Spidermonkey Prototype
Using WebWorker Prototype
Version 0.1
Videos and presentations
WebAudio JS interfaces student project
WebAudio nodes student project
WebCompatBug
WebSocket student project
Webdriver student project
Webdriver tests student project
Webrender Overview
Whistler 2019 notes
Whistler Bugzilla
Whistler FFOS
Whistler GFX
Whistler Houdini1
Whistler Houdini2
Whistler Necko
Whistler Oxidation 2019
Work items for new contributors
Workweek COW DOM
Workweek alt js
Workweek android arm
Workweek boot 2 servo
Workweek compiler lints
Workweek displaylist
Workweek dogfooding
Workweek encoding
Workweek generated content
Workweek governance
Workweek graphics stack
Workweek graphics toolkit
Workweek incremental layout
Workweek js bindings status
Workweek layers
Workweek layers2
Workweek pixels
Workweek rasterization
Workweek reftests
Workweek roadmap
Workweek script crate
Workweek security
Workweek string interning
Workweek tables
Workweek writing modes
XML parser student project
infra triage notes
jQuery status
webxr.today support
Clone
1
Workweek compiler lints
Josh Matthews edited this page 2014-07-07 17:50:11 -07:00
Table of Contents
Compiler Lints
https://github.com/kmcallister/rfcs/blob/lints/active/0000-loadable-lints.md
- kmc: brainstorming what lints we want for Servo. We thought of forbidding non-abstract units in modules that have been converted. if we get around to doing TLS, we'll want crypto lints to make sure we don't screw it up.
- jack: what are the lints we have for servo so far?
- kmc: #1 is jsmanaged, hopefully will be a reasonable testcase.
- jack: that's what, avoid returning js, jsref?
- kmc: you shouldn't be able to return jsref due to lifetimes. need to make sure that js only present in JS managed types with trace hooks.
- gw: in games, only allowed to allocate during init/deinit. could something like that be linted?
- jack: how in C? checked a global and asserted?
- gw: yes
- pcwalton: we have a lint for disabling allocation in given module
- kmc: you can put custom attributes on things and check them in lints.
- pcwalton: when you have HOF, harder.
- kmc: lints don't have to catch every error.
- gw: how does taking an AST work with formatting lints?
- kmc: currently can't check tabs vs. spaces, it's AST. pretty flexible, could add more methods to lint trait. could add method for checking string before tokenized, before token tree, before parse...
- gw: are comments present?
- kmc: not right now. someone's doing work to preserve original text in token tree, throwing out comments. we have attributes, so we mostly don't need to put lint metadata in comments (want https://github.com/rust-lang/rfcs/pull/16 though). in html parser, there are macros that expand to match statements. these look at internal ids assigned to interned strings, and consumer code shouldn't see that, but i can't make it private because macros could expand everywhere. a lint could help with this. macros don't scope cleanly, fixing that is a big project, but lints could help avoid problems. other things may be similar.
- jack: would be nice to get style guidelines as lints. is there warning in rust for missing docs for public items?
- kmc: yes. lints can also access the doc strings for spellcheck, formatting, etc.
- jack: plan to rewrite lints in new framework?
- kmc: rustc's lints are mostly in this framework now, as a module that's part of rustc. might later move them to an extern crate that's automatically injected like libstd. some passes in the backend aren't integrated yet, like enum sizing.
- kmc: Lints could also walk the code just before it's handed to LLVM, for cases that can't be done in earlier passes.
- kmc: rust-lua needs to ensure that any rust function calling lua function that might longjmp doesn't have objects on stack with destructors. This could be done as a lint.
- gw: in lint code, can you access platform, arch, cpu, etc?
- kmc: you can access compiler driver session. (https://github.com/mozilla/rust/blob/master/src/librustc/driver/session.rs ) targ_cfg field has all those things. -kmc: similar to lint plugins, we could also have "cfg plugins" that dynamically decide what to compile
- kmc: anything that doesn't cleanly fit in lint could be a new kind of plugin; adding these is easy. i did a huge refactor of rust's lint code but once that was done, actually adding lint plugins was like 200 lines.
- jack: are there other compilers that have this?
- kmc: java, gcc, llvm. gcc was slow to add it due to ideological concerns about code sharing. still fair amount of effort to add clang plugin.
- jack: it seems like rustc is simple enough that people will actually do this.
- kmc: there's a fine line, because we can't guarantee a stable API. people will be excited, but we should be explicit that if you write a lint then you may need to rewrite it tomorrow.
- jack: seems reasonable.
- kmc: totally fine for servo. but once we release 1.0 and people are not in early adopter mentality, could get grumpier about it. it's feature gated but we could make it clearer what that means
- kmc: since we use llvm, we could expose everything needed for llvm plugins and write them in rust.
- jack: when will this land?
- kmc: RFC for plugin registrar was approved, code is being reviewed. RFC for lints themselves hasn't seen much discussion. see what discussion happens in next meeting.
- gw: is there a way to see from a binary which lints were used? for example, crypto library would be good to guarantee it was built with certain set.
- kmc: good idea. could store string of lints and libraries in final binary, still don't know versions used. could library force certain lints? can't link it without required set of lints? some libraries will have safety guarantees that are enforced by lints, so we should support that. scary relying on lints for safety but the practical alternative is that people won't check those assumptions at all. [This is a tricky thing that the community will need to find a consensus norm about.]
(live demo based on https://gist.github.com/kmcallister/3409ece44ead6d280b8e)