Skip to content

Rename CodeMap/FileMap to SourceMap/SourceFile. #51574

Description

@eddyb

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

Activity

  1. added
    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.
    on Jun 15, 2018
  2. added
    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
    on Jun 15, 2018
  3. abhijeetbhagat commented on Jun 15, 2018

    @abhijeetbhagat
    Contributor

    I can take this up.

  4. abhijeetbhagat commented on Jun 22, 2018

    @abhijeetbhagat
    Contributor

    What about structs like FileMapAndLine ?

  5. eddyb commented on Jun 22, 2018

    @eddyb
    ContributorAuthor

    @abhijeetbhagat SourceFileAndLine looks fine to me.

  6. dsciarra commented on Jul 30, 2018

    @dsciarra
    Contributor

    should the module codemap also be renamed?

  7. eddyb commented on Jul 30, 2018

    @eddyb
    ContributorAuthor

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

  8. abhijeetbhagat commented on Jul 31, 2018

    @abhijeetbhagat
    Contributor

    Right. Changing that too.

  9. added a commit that references this issue on Aug 19, 2018
  10. jolson88 commented on Oct 6, 2018

    @jolson88
    Contributor

    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
  11. added a commit that references this issue on Oct 30, 2018
  12. eddyb commented on Nov 3, 2018

    @eddyb
    ContributorAuthor

    I assume this is done after #55190?

  13. eddyb commented on Feb 10, 2020

    @eddyb
    ContributorAuthor

    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.

  14. reopened this on Feb 10, 2020
  15. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Feb 20, 2020
  16. added a commit that references this issue on Feb 23, 2020
  17. Alexendoo commented on Apr 30, 2020

    @Alexendoo
    Member

    Looks done after #69375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions