Commit Graph

125 Commits

Author SHA1 Message Date
Igor Randjelovic 99585d88d0
fix: safeguard agains `undefined` entry 2021-08-25 21:29:40 +02:00
Tobias Koppers 0088d5565c fix crash when trying to snapshot not existing directory 2021-08-19 13:17:18 +02:00
Tobias Koppers 9577b88d4b track and resolve symlinks when reading context timestamps/hashes
refactor context snapshotting for abstraction purposes
add (symlink) unit test cases for FileSystemInfo snapshotting
2021-08-18 14:50:23 +02:00
Tobias Koppers 5044d62bb2 fix clear 2021-07-16 13:07:56 +02:00
Tobias Koppers 8dd38f5c8a refactor 2021-07-16 13:05:18 +02:00
Mark Molinaro 41f02f947a perf: let Compiler worry about and manage file and context timestamps 2021-07-13 22:13:40 +00:00
Tobias Koppers b0fa9ccada pretty files 2021-05-11 09:31:46 +02:00
Tobias Koppers adc10a5636 make ESM tracking info message less verbose 2021-04-30 15:07:17 +02:00
Tobias Koppers 85fe6ac4f4
Merge pull request #13157 from scamden/pr-hash-bug
fix(resolve): allows filesysteminfo to resolve files that have #'s
2021-04-19 19:42:59 +02:00
Tobias Koppers 0197867237 use paths without fragment and query 2021-04-19 12:13:47 +02:00
Sterling Camden 1e396e8296 fix(resolve): allows filesysteminfo to resolve files that have #'s escaped with \0
i don't understand the reasoning behind @sokra's escaping in enhanced resolve well enough to know if

this makes sense or is basically just undoing the hard work he did to distinguish these characters

from fragments. maybe he can chime in if this makes no sense to do
2021-04-15 11:43:34 -07:00
Tobias Koppers c7b1471251 cheaper getIterator 2021-04-15 15:17:52 +02:00
Tobias Koppers e2fb89eed1 improve resolving of build dependencies when `exports` field is used 2021-04-06 13:58:36 +02:00
Tobias Koppers 8f3a16a49a improve handling of optional build dependencies 2021-04-06 11:28:41 +02:00
Tobias Koppers 3b8d26df1e
Merge pull request #12990 from webpack/bugfix/memory-leak-in-ic
memory usage improvements, add GC support for memory cache, persistent cache only mode
2021-04-01 18:14:16 +02:00
Tobias Koppers 8074127b98 avoid leaking memory after the compiler has been closed
clear cache on shutdown
2021-04-01 16:59:48 +02:00
Tobias Koppers cb94f3cbea improve logging for resolving build dependencies 2021-03-29 09:17:24 +02:00
Tobias Koppers f76ffc0c01 improve resolveBuildDependencies performance 2021-01-15 10:50:02 +01:00
Tobias Koppers 89aabf7696 add experimental ESM tracking based on es-module-lexer
assume that other files have no dependencies
2021-01-13 23:56:29 +01:00
Tobias Koppers c453624a57 store build deps correctly in cache
improve debug logging for snapshotting
2021-01-13 23:54:15 +01:00
Tobias Koppers a2e326129c make filesystem types compatible with memfs and normal fs
fixes #12400
2021-01-13 10:14:58 +01:00
Tobias Koppers 1b07821739 fix incorrect iteration 2020-09-18 21:47:46 +02:00
Tobias Koppers 6715d031b8 avoid error for managed paths that only contain a node_modules 2020-09-17 15:08:38 +02:00
Tobias Koppers d18d555fe2 avoid stack overflow 2020-09-17 11:42:40 +02:00
Tobias Koppers f5be6f0d85 cache deprecated file/context timestamps 2020-09-15 14:39:09 +02:00
Tobias Koppers d6e637f33c add "snapshot" configuration to allow to configure how snapshots are created
expose snapshot options for module, resolve, buildDependencies and resolveBuildDependencies
move managedPaths and immutablePaths from config.cache to config.snapshot
add timestamp + hash snapshotting mode
use timestamp + hash mode by default in production and for buildDependencies
2020-08-26 01:27:13 +02:00
Tobias Koppers cee47dc867 Store cache dependencies inside of Snapshot to reduce cache size 2020-08-24 18:16:54 +02:00
Tobias Koppers 76a6e9b90f create a class for Snapshot for faster access and smaller serialization 2020-08-24 18:16:53 +02:00
Tobias Koppers c309901458 more snapshot statistics 2020-08-24 18:16:53 +02:00
Tobias Koppers 6409463d24 only create shared snapshots for 3 or more shared entries
add logging
2020-08-24 18:16:50 +02:00
Tobias Koppers f61374f3f6 apply snapshot optimization for all snapshot entries 2020-08-24 18:13:59 +02:00
Tobias Koppers 577156f790 extract SnapshotOptimization into separate class
DRY code a little bit
2020-08-24 18:13:59 +02:00
Tobias Koppers f4863f0ef4 improve build dependencies resolving for dependencies with exports field 2020-08-20 10:34:42 +02:00
Tobias Koppers 77cdce7393 remove unused methods, improve code coverage 2020-07-29 11:14:26 +02:00
Tobias Koppers beb58fd23d fix lost file timestamps due to snapshot deduplication
fix missing startTime in deduped snapshots
2020-05-30 21:09:53 +02:00
Tobias Koppers b9c50fdb09 fix jsdoc documentations 2020-04-28 19:42:58 +02:00
evilebottnawi a6a9ce3a74 chore: setup cspell 2020-03-13 14:09:14 +03:00
evilebottnawi dafa4cd69a chore: setup cspell 2020-03-12 19:51:26 +03:00
Nitin Kumar 285529a643
chore: fix typos across the project 2020-03-10 07:29:46 +05:30
Tobias Koppers 352ecd0c3a Dedupe snapshots via shared snapshots 2020-01-31 17:15:15 +01:00
Tobias Koppers ec5a744b30 Remove "error" and "ignore" from snapshots 2020-01-29 21:32:50 +01:00
Tobias Koppers 6172b61938 fix FileSystemInfo logging when multiple different types of invalidation occur 2019-11-14 18:05:21 +01:00
Tobias Koppers c124637646 rename missingTimestamps to missingExistance and only store booleans 2019-11-14 18:05:18 +01:00
Tobias Koppers 1e5f3d4a8f don't check mtime for directories as fileDependency 2019-11-14 18:05:16 +01:00
Tobias Koppers b90f3e14a1 upgrade webpack-sources
make source maps and source names context independent

add enhanced-resolve declarations
add types to Module.build
fix tooling for import order to support import renaming
add support for concatenated modules in eval source maps
2019-11-12 08:59:08 +01:00
Tobias Koppers 53626c09f9 automatically flag created snapshots as valid 2019-11-10 21:04:59 +01:00
Tobias Koppers 65915d55aa fix managed items in context hash or timestamp hash 2019-11-06 00:43:43 +01:00
Tobias Koppers c1fdc68809 fix WatchIgnorePlugin 2019-11-05 23:55:01 +01:00
Tobias Koppers b401713633 fix problem with snapshotting managed items
add support for child loggers
add logging for snapshot errors
improve FileSystemInfo logging
improve managed item reading performance
upgrade enhanced-resolve for readdir purge fix
2019-11-05 23:12:02 +01:00
Tobias Koppers 39431ee8a5 add logging for invalid snapshots 2019-11-04 10:45:51 +01:00
Tobias Koppers 4feef620ea performance improvement of checkSnapshotValid caching 2019-11-01 12:16:30 +01:00
Tobias Koppers ab851370bf improve performance for snapshot validation for repeated snapshots 2019-10-27 07:38:06 +01:00
Ivan Kopeykin 6b1604fe96 types(FileSystemInfo): fix examples 2019-10-20 15:53:17 +03:00
Ivan Kopeykin 4786b33bfc types(FileSystemInfo): minor types and code explanation 2019-10-20 12:35:36 +03:00
Tobias Koppers dc0c63e564 add error code for *nix systems 2019-09-08 21:30:27 +02:00
Tobias Koppers d6d966701d don't thread hidden files in node_modules as managed items 2019-09-08 16:23:25 +02:00
Tobias Koppers fe62f9eabb update hash with empty string for missing files 2019-09-08 16:23:10 +02:00
Tobias Koppers 64dff5c6d4 add missing error handler for context hash and timestamp 2019-09-08 16:22:58 +02:00
Tobias Koppers 1ce68517ca for managed items without package.json snapshot error value 2019-09-08 16:22:13 +02:00
Tobias Koppers d3cf3928f5 Persistent Caching fixes
improve error handling in pack file cache strategy
support context timestamp snapshot
make ContextModule serializable
fix snapshotting bug of managed paths
use managed and immutable path info for context hashes and timestamps
enabled managedPaths for node_modules during cache tests
2019-09-04 16:33:54 +02:00
Tobias Koppers 41de897916 Best effort to capture resolving of file build dependencies 2019-08-20 14:50:14 +02:00
Tobias Koppers cb4c02ebe1 store snapshot of resolving dependencies and re-resolve when needed
to be able to invalidate cache when PnP build dependencies change

cacheDirectory defaults to .pnp/.cache/webpack when PnP is used
fallback cacheDirectory is now .cache/webpack instead of tmpdir
2019-08-20 14:50:09 +02:00
Tobias Koppers a2caa36b8e add immutablePaths next to managedPaths for paths in the yarn cache
for PnP support
2019-08-20 14:50:07 +02:00
Tobias Koppers 9a9d79f509 fix crash when maps are merged 2019-08-13 18:48:15 +02:00
Tobias Koppers 31b912f634 fix getManagedItem and test cases 2019-08-13 17:58:51 +02:00
Tobias Koppers db265cbff8 check managedItems in snapshot 2019-08-13 17:26:54 +02:00
Tobias Koppers fe8fd981ee Use numbers instead of strings as enum
add types
2019-08-13 17:21:19 +02:00
Tobias Koppers ef3a68f61e avoid a string allocation in getManagedItem 2019-08-13 17:15:47 +02:00
Tobias Koppers e5cecdad23 store build dependencies snapshot in pack
add snapshot shortcut for package manager managed paths
add cache.managedPaths
2019-08-13 17:02:37 +02:00
Tobias Koppers e2b1ab3258 adding some random types 2019-07-18 14:15:20 +02:00
Tobias Koppers e4d1a45c8d Use FileSystemInfo.createSnapshot for NormalModules too 2019-01-09 14:42:57 +01:00
Tobias Koppers 4492c30ac4 Update watching system to report more timing info to webpack
Add snapshotting feature to FileSystemInfo for better performance
2019-01-09 14:42:54 +01:00
Tobias Koppers ef9e25d8ea report dependencies from resolver to the compilation
refactor NormalModuleFactory
2019-01-08 15:14:25 +01:00
Tobias Koppers ae72fe3724 fixes timestamp transfer from watcher 2018-09-27 21:28:07 +02:00
Tobias Koppers 7340fbb547 refactor Cache
add a new hookable Cache class
removed CachePlugin
add MemoryCachePlugin
refactor timestamps
create FileSystemInfo class
2018-09-27 13:20:19 +02:00