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

remove UnpackDevTask #62

Closed
rymsha opened this issue Mar 8, 2021 · 0 comments
Closed

remove UnpackDevTask #62

rymsha opened this issue Mar 8, 2021 · 0 comments
Assignees

Comments

@rymsha
Copy link
Contributor

rymsha commented Mar 8, 2021

What it does: It extracts dev folder from lib-admin-ui and lib-contentstudio into ".xp" folder. dev folder contains js and d.ts files , so applications that depend on lib can use contents of dev folder in webpack for instance. (need clarification, why @alansemenov )

Users of such libs write in gradle file

npmInstall.mustRunAfter unpackDevResources

and after that

task webpack {
...
inputs.dir ".xp/dev"

and after that (often forgotten), to exclude dev folder from final application

project.afterEvaluate {
    jar {
        bnd ('Private-Package': '!dev.*, *;-split-package:=merge-first')
    }
}

A few problems:

  • OSGI removing dev.* package actually may exclude some important dependencies in future ( because right now it is not that easy to find a good example, but with new top level domain .dev it is just a matter of time)
  • it is a niche feature with very surprising behavior. Feels like a wrong tool for some simple task.
  • It is error prone (easy to forget that dev must be excluded, some problems can only be solved with deletion of .xp folder, etc...)
  • it is still quite verbose: not enough to "just" call the task. One should know how to use outputs properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants