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

Rename CodeMap/FileMap to SourceMap/SourceFile. #51574

Closed
eddyb opened this issue Jun 15, 2018 · 10 comments
Closed

Rename CodeMap/FileMap to SourceMap/SourceFile. #51574

eddyb opened this issue Jun 15, 2018 · 10 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@eddyb
Copy link
Member

eddyb commented Jun 15, 2018

The name FileMap always seemed a bit jarring, and I think this would be an improvement.
cc @nikomatsakis @nrc

@eddyb eddyb added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Jun 15, 2018
@Mark-Simulacrum Mark-Simulacrum added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Jun 15, 2018
@abhijeetbhagat
Copy link
Contributor

I can take this up.

@abhijeetbhagat
Copy link
Contributor

What about structs like FileMapAndLine ?

@eddyb
Copy link
Member Author

eddyb commented Jun 22, 2018

@abhijeetbhagat SourceFileAndLine looks fine to me.

@dsciarra
Copy link
Contributor

should the module codemap also be renamed?

@eddyb
Copy link
Member Author

eddyb commented Jul 30, 2018

Yeah, any combination of the words "code" and "map" should.

@abhijeetbhagat
Copy link
Contributor

Right. Changing that too.

bors added a commit that referenced this issue Aug 19, 2018
Rename CodeMap/FileMap to SourceMap/SourceFile

A first renaming for #51574
@jolson88
Copy link

jolson88 commented Oct 6, 2018

With the merge, it's unclear to me whether this is an older issue that needs closing, or if there is more work to do. A quick search seems to show the following occurences still:

  • MalformedForCodemap and MalformedCodemapPositions in src/libsyntax_pos/lib.rs and src/libsyntax/source_map.rs
  • pub use self::caching_codemap_view::CachingSourceMapView in src/librustc/ich/mod.rs
  • StableFilemapId in src/libsyntax/source_map.rs

If this issue is still considered open, does that reflect that that these should be renamed as well?

  • MalformedForCodemap -> MalformedForSourceMap
  • MalformedCodemapPositions -> MalformedSourceMapPositions
  • self::caching_codemap_view -> self::caching_source_map_view
  • StableFilemapId -> StableSourceFileId

bors added a commit that referenced this issue Oct 30, 2018
…henkov

Rename other occs of (Code/File)Map to Source(Map/File) #51574

Additional renamings for #51574.
@eddyb
Copy link
Member Author

eddyb commented Nov 3, 2018

I assume this is done after #55190?

@eddyb
Copy link
Member Author

eddyb commented Feb 10, 2020

I came across over this instance of cm today:

pub fn splice_lines(&self, cm: &SourceMap) -> Vec<(String, Vec<SubstitutionPart>, bool)> {

So we might need to do another pass just for easier to miss things like cm.

@eddyb eddyb reopened this Feb 10, 2020
@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 20, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Feb 23, 2020
@Alexendoo
Copy link
Member

Looks done after #69375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants