Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roadmap #182

Open
1 of 20 tasks
DonIsaac opened this issue Dec 28, 2024 · 0 comments
Open
1 of 20 tasks

Roadmap #182

DonIsaac opened this issue Dec 28, 2024 · 0 comments
Labels
C-enhancement Category - New feature or request

Comments

@DonIsaac
Copy link
Owner

DonIsaac commented Dec 28, 2024

This is a living document laying out goals for this project and what order they should be completed in. Expect changes as time progresses.

Note

Any checkbox not yet turned into a github issue means I haven't gotten around to
fleshing out the details yet.

Table of Contents

1 Primary Goals

1.1 Make the linter as immediately useful as possible

1.2 Cross-file analysis

  • Control flow analysis
    • Should happen at bind time
  • Add thread-safe arena collection (e.g. bumpalo-herd)
    • Stores memory arena + parse/bind results
  • Build a module graph
  • Split semantic analysis into bind and check phase
    • happens in isolation (and thus is embarrassingly parallel) while check is cross-file
    • In order to split, reference analysis must move to check phase
    • check will eventually perform type checking
    • Consider supporting "isolated" check (less informative, but can be done in parallel)

1.3 Editor integrations

  • prereq: add a fs abstraction layer
    • will allow for easy integration with LSP's Document and its related commants
  • Implement LSP API layer

1.4 Add a type checker

This is directly dependent on/blocked by goal 2.

  • Prototype this to figure out what needs to get done and how it should be structured

1.5 Detect undefined behavior using an SMT solver

Dependent on control flow analysis.

  • Integrate with Z3 (or some other SMT solver)

2 Auxilliary Goals

Objectives not in the critical path but are pretty important. Most of these can be done in isolation and are generally good ways for newcomers to contribute.

2.1 Data structures

These data structures are needed by one or more zlint subsystems for performance reasons. They should be made available to the broader Zig community, either as an isolated zlint export or by moving them to another repository.

  • Implement a highly performant multi-sender, single-consumer queue
    • Currently a major bottleneck for sending lint diagnostics to the reporter. Linter threads and reporter thread all fight over a single mutex lock.
  • Implement a string intern pool
  • Port DashMap to Zig started, its called Dora Still a WIP and needs to be consumed in ZLint.

2.2 Stability

  • Add benchmarks for semantic analysis
  • Add benchmarks for linting
  • Lint projects using ZLint in ecosystem CI to check for regressions

2.3 Administrative

  • Contact the Codspeed team re. supporting Zig
@DonIsaac DonIsaac added the C-enhancement Category - New feature or request label Dec 28, 2024
@DonIsaac DonIsaac pinned this issue Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category - New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant