mapbox / mapbox/mapbox-gl-js

Disambiguate "source" in worker.js

Open
#3,908 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

refactoring :building_construction:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Reading source/worker.js, I'm getting tripped up on two different meanings of "Source". "Source" generally seems to refer to "data source", but in functions like get/register/loadWorkerSource I think it refers to "source code" (or maybe both at the same time?). I'm not sure I understand what's going on well enough to say what the right names are, but maybe we should just use "SourceCode" whenever "source" is referring to code?

@lucaswoj @anandthakker

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in source/worker.js by tracing getSource, registerSource, and loadWorkerSource and comparing how each use of “source” refers to data or source code. Review their callers and related naming before deciding on consistent terminology; done means the distinction is clear throughout the worker code and its references.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.