W
Wasp2d ago
Yadd

waspc_datadir

Is there a reason why wasp's installer packages these TS apps in it's data directory? the documentation says this:
Wasp bundles some TypeScript packages into the installation artifact (eg: deployment scripts), which end up in the installed version's waspc_datadir. To do so in CI, it runs ./tools/install_packages_to_data_dir.sh.
But looking at references to the waspc_datadir, it's not used Am i missing something?
2 Replies
kapa.ai
kapa.ai2d ago
Hi @Yadd. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources provided, I can offer some insights about the waspc_datadir in Wasp, although the information is somewhat limited. The waspc_datadir is indeed used in Wasp's installation and execution process, although its exact purpose and usage are not fully clear from the given information. Here's what we can gather: 1. The installer script uses waspc_datadir to store Wasp's data, including the binary package downloaded during installation. This is evident from the installation script issue where it's mentioned that the binary package is unpacked into the DATA_DST_DIR, which is likely the waspc_datadir. 2. The waspc_datadir is referenced in the execution of Wasp. As seen in the same issue, the Wasp executable is configured to use this directory:
printf '#!/usr/bin/env bash\nwaspc_datadir=%s/data %s/wasp-bin "$@"\n' "$DATA_DST_DIR" "$DATA_DST_DIR" \
> "$BIN_DST_DIR/wasp"

printf '#!/usr/bin/env bash\nwaspc_datadir=%s/data %s/wasp-bin "$@"\n' "$DATA_DST_DIR" "$DATA_DST_DIR" \
> "$BIN_DST_DIR/wasp"

3. There's an ongoing discussion about not hardcoding paths for user directories, including the waspc_datadir. This is mentioned in the issue about hardcoded paths, suggesting that the location of this directory might change in the future to follow the XDG standard. 4. The waspc_datadir can sometimes cause permission issues, as noted in this issue where read-only sub-directories in the waspc_datadir caused problems when creating a new project. However, the specific question about why TypeScript apps are packaged in the data directory is not directly addressed in the provided knowledge sources. The documentation you mentioned about bundling TypeScript packages into the installation artifact is not present in the given information. It's possible that this packaging serves a purpose that's not explicitly stated in the provided sources, or that it's part of Wasp's internal workings that aren't fully documented here. If you need more specific information about why these TypeScript apps are packaged in the data directory, you might want to consult the Wasp documentation or reach out to the Wasp development team directly. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Yadd, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
miho19h ago
But looking at references to the waspc_datadir, it's not used
Where are you looking at the references? Wasp CLI uses those TS packages to do various things: deployment to Fly, Typescript analysis, Wasp Studio etc.

Did you find this page helpful?