Skip to content

UsePath instead of File in the API #47

Closed

Description

@laeubi

To encourage user to use modern API all File references should be replaced by Path references, even though currently due to the Plexus-Scanner-API only File pathes are actually supported.

Activity

  1. laeubi commented on Nov 23, 2022

    @laeubi
    CollaboratorAuthor
  2. laeubi commented on Nov 24, 2022

    @laeubi
    CollaboratorAuthor

    Another option would be to get rid of the Scanner API completely and return a DirectoryStream instead ...

  3. laeubi commented on Nov 24, 2022

    @laeubi
    CollaboratorAuthor

    I have checked m2e and it uses AbstractScanner only (so directory scanner is not really a concern for it and mostly used for the default impl) and mostly uses it to check if a delta found matches.

    @kwin as you recently made some plugins Build API aware, I wonder if you can shade some light how useful the methods newScanner/newDeleteScanner are actually are, I feel like we can simply get rid of them completely and just offer a newDeltaStream() that list all items (deleted, new, changed) and then users can use other method of the context to decide what state they actually have (if the implementation itself actually is not using a different filtering mechanism already) ...

  4. added
    enhancement
    breaking
    on Jan 6, 2025
  5. slachiewicz commented on Nov 8, 2026

    @slachiewicz
    Member

    The Path-based replacement is being done as new packages instead of changing BuildContext: the Messages API (merged, 1.3.0) already takes Path, and the Resources API is tracked in #76 (PR #104). Closing as a duplicate of #76.

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

    breakingenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions