Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Target profiles, directory generation, and automatically moving dependencies when needed #16

Merged
merged 7 commits into from Sep 22, 2022

Conversation

hrszpuk
Copy link
Owner

@hrszpuk hrszpuk commented Sep 22, 2022

Issue

Each build profile should have their own target folder as each build profile can have different settings. Furthermore, the application being build may require files/folders at runtime, these can be moved from /deps (default) to the build profile target directory so the application has direct access to them when it is being ran.

Solution

The implementation currently is not very flexible, although this should change when the compilation profile code is refactored in the near future. Below is a list of the features implemented.

  1. build/run can be built into /target/{build|run} (default)
  2. Dependencies in /deps (default) are copied into /target/{build|run}

Notes about the implementation

Currently the entire /deps folder is copied. This should be changed to only copy files/folders inside the /deps.

fs_extra (https://docs.rs/fs_extra/latest) is an extension to std::fs that allows for the moving and copying of files. This will be used to move files out of deps/ into target/{build/run}.
Added github action for rust.yml.
Rust likes to give a lot of warnings <_<
@hrszpuk hrszpuk self-assigned this Sep 22, 2022
@hrszpuk hrszpuk added enhancement New feature or request manager module labels Sep 22, 2022
@hrszpuk hrszpuk added this to the Release v1.0.0 milestone Sep 22, 2022
@hrszpuk hrszpuk linked an issue Sep 22, 2022 that may be closed by this pull request
6 tasks
Copy link
Owner Author

@hrszpuk hrszpuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks mostly fine :P

@hrszpuk
Copy link
Owner Author

hrszpuk commented Sep 22, 2022

Yeah this isn't going to build on Windows because the file handling currently uses Unix / which won't work on Windows. I need to fix that (#14)

Error handling was using ? to bubble up the error.
Now I'm just handling it inside the function.
@hrszpuk hrszpuk merged commit 0e8d826 into develop Sep 22, 2022
@hrszpuk hrszpuk deleted the target_dep_dirs branch September 22, 2022 16:24
@hrszpuk hrszpuk mentioned this pull request Sep 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generating compilation directories, and dependency management
1 participant