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

Enable to specify include and exclude resource patterns with glob #3562

Merged
merged 5 commits into from
Oct 16, 2023

Commits on Oct 11, 2023

  1. Enable to specify include and exclude resource patterns with glob

    This commit enables scala-native to specify include and exclude resource patterns with glob.
    This will allow users to reduce the size of their executables by excluding unnecessary resources.
    
    To use this feature, users can specify the include and exclude patterns using the
    `NativeConfig`'s `withResourceIncludePatterns` and `withResourceExcludePatterns` APIs.
    For example, to exclude the `rootdoc.txt` file, users would specify the following pattern:
    
    ```scala
    _.withResourceIncludePatterns(Seq("**.txt"))
     .withResourceExcludePatterns(Seq("rootdoc.txt"))
    ```
    
    The default behavior is to include all resources (`**`), excluding `/scala-native/**`.
    (Note that, scala-native will exclude the resources `/scala-native/**`
    anyway, even users update the exclude patterns).
    
    Also, note that this featuer is using Java's PathMatcher,
    which behave a bit different from the posix glob.
    https://docs.oracle.com/javase/tutorial/essential/io/find.html
    tanishiking committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    7c5e4b7 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2023

  1. Update docs/lib/javalib.rst doc

    Co-authored-by: Wojciech Mazur <wojciech.mazur95@gmail.com>
    tanishiking and WojciechMazur committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    04dda19 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b7e9ab0 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2023

  1. Update tools/src/main/scala/scala/scalanative/codegen/ResourceEmbedde…

    …r.scala
    
    Co-authored-by: Wojciech Mazur <wojciech.mazur95@gmail.com>
    tanishiking and WojciechMazur committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    0f99a2a View commit details
    Browse the repository at this point in the history
  2. Fix test comments

    tanishiking committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    1b9c8de View commit details
    Browse the repository at this point in the history