gentle-sugar-52379
09/08/2023, 6:24 AMresources(
sources = ["./**/*"],
dependencies = [":js_libs"]
)
relocated_files(
name = "js_libs",
src = "src/js_libs",
dest = "src/tuhls/core/static",
files_targets = ["src/js_libs/alpinejs.3.10.3.min.js"],
)
bitter-ability-32190
09/08/2023, 11:20 AMbitter-ability-32190
09/08/2023, 11:21 AMgentle-sugar-52379
09/08/2023, 11:32 AMgentle-sugar-52379
09/09/2023, 3:00 AMresources(
dependencies = [":wrapped_js_libs"],
sources = ["**/*"],
)
experimental_wrap_as_resources(
name = "wrapped_js_libs",
inputs = [":relocated_js_libs"],
)
relocated_files(
name = "relocated_js_libs",
src = "src/js_libs",
dest = "src/tuhls/core/static",
files_targets = ["src/js_libs"],
)
but i cant see the js files in the pex. but as i include all resources i can see the static folder and the BUILD file from it in the pex filebroad-processor-92400
09/09/2023, 5:53 AMgentle-sugar-52379
09/09/2023, 6:19 AMpython_sources(
name = "src",
dependencies = [
"./base",
"./app",
"./css",
"src/tuhls/core",
"src/tuhls/dashboard",
"src/tuhls/icons",
],
)
pex_binary(
name = "manage_dev_pex",
dependencies = [
":src",
"3rdparty/python:reqs#django-extensions",
"3rdparty/python:reqs#Werkzeug",
],
entry_point = "manage.py",
execution_mode = "venv",
layout = "loose",
)
gentle-sugar-52379
09/09/2023, 6:20 AMgentle-sugar-52379
09/09/2023, 7:59 AMresources(sources = ["*.js"])
now im using files(sources = ["*.js"])
in 2.16.0dev it worked with resources. relocated_files
was able to move the things arround
now it only works with files
gentle-sugar-52379
09/09/2023, 8:17 AM- .bootstrap
- .deps
- __pex__
- marla
- tuhls
- core
- static
- utils
and when i try to move the dependent files like so
relocated_files(
name = "relocated_files",
src = "src/js_libs",
dest = "src/tuhls/core/static",
files_targets = ["src/js_libs"],
)
the new tree looks like this
- .bootstrap
- .deps
- __pex__
- marla
- src
- tuhls
- core
- static
- tuhls
- core
- static
- utils
so i thought this could be an easy one and changed my relocated_files to
relocated_files(
name = "relocated_files",
src = "src/js_libs",
dest = "tuhls/core/static",
files_targets = ["src/js_libs"],
)
with the result: NoSourceRootError: No source root found for tuhls/core/static
.
either theres something broken in my head or in pants. maybe in booth, idk, im lost :Dbroad-processor-92400
09/09/2023, 9:30 AMgentle-sugar-52379
09/09/2023, 9:44 AMbroad-processor-92400
09/09/2023, 9:45 AMgentle-sugar-52379
09/09/2023, 9:45 AMgentle-sugar-52379
09/09/2023, 9:47 AMbroad-processor-92400
09/09/2023, 9:49 AMgentle-sugar-52379
09/09/2023, 10:16 AMbroad-processor-92400
09/09/2023, 10:23 AMgentle-sugar-52379
09/09/2023, 10:25 AMbitter-ability-32190
09/09/2023, 12:10 PMPANTS_VERSION=2.16.0 pants ...
To override the version. Makes it easy to compare from the terminal 🙂