21 Commits

Author SHA1 Message Date
Kay Hayen
3cd6d891d3 Quality: Update to latest black
* Only change is formatting of docstrings has different ideas
  about how whitespace is to be assigned.
2025-12-19 10:25:44 +01:00
Kay Hayen
bf83bbf3ab MSYS2: Added back support
* Now that more paths are checked for legality, we need to avoid adding "/" to paths much harder.

* Added support for module mode and accelerated mode for the first time. Now all modes work.
2025-12-19 10:25:43 +01:00
Kay Hayen
e1feec4ee9 Optimization: Avoid local imports because of plugins usage
* This is not all that is now possible, but a good step ahead.

* We put the callables to a new module and assign the "Plugins" class into it, making this very easy.
2025-11-26 11:19:43 +00:00
Kay Hayen
c2482c7a6d Reports: Including CPU instr and cycle counters in timing on native Linux
* With appropriate configuration on Linux this allows to get at very
  precise timing configuration so we can judge even small compile time
  improvements correctly. We then don't need many runs to average out
  noise from other effects.

* Don't use wall clock but process time for steps that are not doing
  IO like module optimization for more accurate values otherwise, it
  is however not very accurate still.
2025-11-26 11:19:43 +00:00
Kay Hayen
a6001c9b7f Fix, need to avoid using filenames with more than 250 chars
* For cache files, const files, and C files, we need to make sure, we don't exceed the 255 char limits per path element literally everything has.

* Also enhanced the check code for legal paths to cover this, so user options are covered from this errors too.

* Moved file hashing to file operations where it makes more sense to allow module names to use hashing to provide a legal filename for themselves.
2025-10-10 17:05:45 +02:00
Kay Hayen
26a1fecc7a Reports: Save and restore timing information for cached modules
* In this way, we don't have a difference if a module is loaded from cache or not.

* Should make our life for Nuitka-Watch much easier by avoiding this noise.
2025-04-28 11:04:39 +02:00
Kay Hayen
718ab60539 Bump copyright year 2025-04-28 11:04:36 +02:00
Kay Hayen
f34f8d0c63 Bump copyright year
* Also split copyright notices between the top and bottom,
  such that readability of just opened files is not harmed
  by license text.
2024-12-18 10:48:16 +01:00
Kay Hayen
dd5f1d92dd UI: Added support for per cache category environment variables
* Still need to document this, probably should have
  a module to define cache category names, such that
  we can add their names.
2024-12-18 10:46:53 +01:00
Kay Hayen
9a13ecc929 Debugging: Output more details when this happens 2024-12-18 10:40:07 +01:00
Kay Hayen
db125e86c6 Reports: Keep track of failed to use distributions
* For that we need to use dedicated nodes that track the failure
  to find a distribution.

* Since we only replace once, we need to do it in dedicated nodes.

* This is still work in progress, "pkg_resources" is not yet covered and
 success should also be tracked.

* For caching found distributions should be compared, but that is
  not yet done.
2023-07-16 22:57:17 +02:00
Kay Hayen
158f7b25ad Cleanup, do not treat technical modules special anymore
* The early demotion to bytecode is not really needed and prevented
  dependency analysis correctness, which we have had issues with ever
  since not all modules are automatic.

* Moved import detection code to dedicated module cleaning up the size
  of the standalone mechanics, it also is not exclusive to it.

* Adding reasons to modules, different from decision reasons why
  something was allowed to be included, these give the technical
  reason why something is added. This is needed for anti-bloat to
  be able to ignore stdlib being added only for being frozen.

* Now correctly annotating why an extension module was included,
  is it technical or not, that solves a TODO.

* Removes a lot of code duplication for reading source and bytecode
  of bytecode modules and handling of uncompiled modules as a
  category in the module registry.

* The detection logic itself for technical was not robust and had
  bugs, that make it unclear how it ever worked as well.
2023-07-16 22:37:52 +02:00
Kay Hayen
909d41f02d Bump copyright year 2023-06-02 15:07:22 +02:00
Kay Hayen
d9ada19072 Quality: Updated to latest PyLint
* The 3.11 with newer pip cannot build dependencies of older
  astroid due to some breaking of pip, so we are kind of pushed
  to update this.

* A few nice findings, but unfortunately arguments-differ no
  longer is usable.
2023-06-02 15:07:21 +02:00
Kay Hayen
458e45510b Optimization: The bytecode cache check needs to handle relative imports better
* Otherwise some stdlib modules were always recompiled.
2023-06-02 15:07:21 +02:00
Kay Hayen
ab8364447f Optimization: When locating a module, return also module kind
* Instead of regenerating the information after the fact, we can just
  forward it from where it was already known, during the module finding.

* Also cache decisions about module recursion, or else plugins get
  asked multiple times about a module inclusion.

* The bytecode cache now also is invalidated if the module kind of a
  used module changes.
2023-01-17 13:26:02 +01:00
Kay Hayen
090393535e Cleanup, use factory module for namedtuples
* When inheriting, having "__slots__" seems mandatory.

* We should cleanup our existing namedtuples to have proper methods and use this.
2023-01-17 13:26:02 +01:00
Kay Hayen
63f9543aa9 Optimization: The bytecode cache considers only attempted modules
* Previously because we didn't know what failed, we were
  looking at all imports that could be done, but the current
  directory spoiled that easily.

* Make sure enabled plugins make a difference though, and so
  does the Python version string.
2023-01-09 16:44:52 +01:00
Fire Cube
fcad5e9a1d Reports: Also track modules attempted to be imported internally and include it in the report
* Used namedtuple to track module usage attempt information rather than tuples and their unpacking.

* Bumps the cache format, as we now store more information there.

Co-authored-by: Kay Hayen <kay.hayen@gmail.com>
2023-01-09 16:44:30 +01:00
Kay Hayen
ac13cbd4ed Fix, bytecode cache files were used and stored in the top of cache folder.
* Without this, their cleaning didn't work.
2023-01-09 16:41:52 +01:00
Kay Hayen
d6e94d68f3 UI: Added option to clean caches, and unified option for disabling caches
* This doesn't yet cover downloads, but that will be added too.
2022-11-19 16:02:22 +01:00