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

Avoid the scan of system modules when the user doesn't declare at least one #116

Closed
TheRustifyer opened this issue Jun 24, 2024 · 1 comment · Fixed by #109
Closed

Avoid the scan of system modules when the user doesn't declare at least one #116

TheRustifyer opened this issue Jun 24, 2024 · 1 comment · Fixed by #109
Assignees
Labels
enhancement New feature or request refactor

Comments

@TheRustifyer
Copy link
Member

Refactor

Currently, we are relying on the results of the directory scanning for the target system modules even if they don't exist. That causes to iterate over the compilers targets directories for the .pcm(s) of the system headers after modularizing them, even if the user didn't request any system header to be compiled as a module.

Therefore, we are wasting machine cycles instead of checking if its a needed operation. So its required to fix them just by checking if the user declared some system module.

@TheRustifyer TheRustifyer added enhancement New feature or request refactor labels Jun 24, 2024
@TheRustifyer TheRustifyer self-assigned this Jun 24, 2024
@TheRustifyer TheRustifyer linked a pull request Jun 24, 2024 that will close this issue
12 tasks
TheRustifyer added a commit that referenced this issue Jun 24, 2024
… if they are already built if there's no header declared by the user. This closes #116
@TheRustifyer
Copy link
Member Author

TheRustifyer commented Jun 24, 2024

Closed on #f7c928c

TheRustifyer added a commit that referenced this issue Aug 7, 2024
* chore: setting up the base ideas of the refactor and the clean-up

* feat: Moving towards the owned data processing model
feat: removed the cache last generated commands, so they're one only one entity
feat: reworked the conversion from our cache to the compile_commands.json format
feat: unified the serialization and serialization entities. The intermediate ones used to clone data from the non-owned version of the cache has been deleted, and the SourceCommandLine now only works with owned data, so there's no need anymore to use those intermediate data mappers (that already was cloning from borrowed data)

* feat(wip): reworking how the cache store the generated commands, and avoids

* feat(wip): time for the renormalization of the module implementations

* feat(wip): saving the job so far

* feat(wip)!: Creational Flyweights to reduce the memory usage footprint and common Argument(s) that only need to be created once

* test(wip)!: saving the attributes &str to Cow refactor

* test: saving the refactor of the cfg and model data structures being Cow based

* feat(wip): Finished the refactor step of the project model using Cow instead of owned data. Code compiles but is far from finished yet

* feat(system_headers): Avoiding check the fs for system headers to see if they are already built if there's no header declared by the user. This closes #116

* fix: missed .with_extension methods on the implementations of TranslationUnit
fix: we can't use join for file_stem(s) that contains dots in their names, since it skips anything after the first point

* fix: removed unused borrows of the project configuration since its ownership is transferred to the build_model procedure

* fix: removed unused borrows of the project configuration since its ownership is transferred to the build_model procedure
fix: changed back the types on the config file data structures to their original reference types

* feat(wip): Renormalizing the types of the data that will be sent to the CLI

* feat(wip): Flexible inputs on the commands executor

* feat(wip): Flexible inputs on the commands executor

* feat(wip): Working with the interior mutability pattern to see if it's worth the change of not having commands

* chore(wip): Towards the unique generation and generification of the processing of translation units

* feat: No ReferenceCounted or Interior Mutability patterns are required anymore. Everything works again with plain references or moved values

* feat: Making Clang the first compiler that correctly uses the Flyweights data structures for generating the C++ module interfaces command lines

* feat: Applying the latest changes to all the kind of translation units (raw sources)

* feat: The generated obj files that are added to the linker are appended at generation time only

* fix: removing the duplicated std byproducts (obj files) on the linker command line

* feat: Introducing the transient crate to allow downcasting the implementors of TranslationUnit when they're behind a impl TranslationUnit

* feat: Generification of the commands generator for any kind of Translation Unit, so now we only need a single block of code to process them all

* feat: Avoiding duplicating the linker arguments with an early guard while we don't implement named targets

* feat: refactor of the core of the procedure for that takes care about the commands generation
feat: reworked the cache loading/save
feat: added a metadata field for the cache
feat: improving the iteration times among different build processes

* fix: missed function invocations on the benchmarks module

* fix: changed the arguments passed to the bencher function on the measures of the 'Generate Commands'

* chore: cargo fmt

* feat: refactor of the C++ modular std lib procedure
chore: code reorganization and clean-up

* feat: Argument has now Cow<str> as the inner type

* fix: changed again the 'generate_commands' signature without reflecting it on the benchmarks module

* feat: Enabling GCC tests on Windows thanks to MSYS2 on the GitHub's virtual machines

* chore: cargo fmt

* feat: Caching the project model, so it can be loaded as a cached entity instead of mapping the target cfg to the project model on every iteration. Closes #120

* fix: missing the project root on the cached data serialized given the new structure

* fix: Only loading the cache metadata on the clean runs

* chore: small opts and docs

* feat: upgrading the .unwrap() on the downcast of the translation units to handle results

* fix: removing the trailing whitespace when printing the generated arguments for a translation unit

* perf: aggressive optimizations of the compile commands generation

* fix: cleaned needless lifetimes

* chore: cargo fmt

* chore: cargo fmt

* fix: changed the unwrap_or_else of the load_and_deserialize for its original behaviour (unwrap or default)

* chore: conceptually reordering the data structures of the generated commands within the domain on the project files

* feat(targets)!: WIP. Towards the named targets processing model

* feat(WIP)!: Setting the basis for handle any number of user declared targets

* feat(WIP): Splitting modules from linker command lines. Saving the job so far

* feat(wip): indepent targets now compiles and runs successfuly

chore: refactored the .collect() calls on the chained iterators to just
use an opaque type behind the Iterator type and avoid to consume the
view of the command line arguments

* fix: rollbacked changes until the new targets model builds the commands on Zero again

* chore: minimal opts

* feat: filtering out the target sources that doesn't need to be rebuilt

* feat: Reducing cognitive load on the run_zork fn

* fix: Use the new targets.target format on the template zork config files

* fix: missing 'compile but no link' argument on Clang and GCC

* fix: Missing byproduct path on the SystemModule kind of translation unit

This bug was causing to fail the linkage step, since the linker was
receiving a ::default()(ed) Argument, which evaluates to ""

* feat: project root cfg attribute will be used as a joinable path to make the user's declared files easier to read, reducing the amount of directories per file that should be passed to the configuration file

* fix: code root is joined to the resolved absolute path when declared efficiently

* feat: Handling activation/deactivation of named targets via CLI argument

* feat: Better Sourceset API

* chore: doc-tests

* chore: doc-lazy from clippy warnings

* fix: Removing the sysmodules byproducts from the GCC linker command line of every target, since GCC handles the references to the modules via gcm.cache

* fix: bringing the chain of the modules.implementations for the linker command line, deleted by mistake (too much v-dd)

* feat: New type for better readability while passing the shared args and env vars to the commands executors

* chore: lint and fmt

* feat: finished the work for mapping targets data from model to cache

* feat: ensuring to remove from cache files deleted by the user

* chore: code cleanup, ultimate perf upgrades before the release

* docs: Targets documentation

* feat: test targets are manually picked by name when they contains test on their identifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant