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

Remove chonky Lens and replace with microlens for smaller footprint. #996

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

mankyKitty
Copy link

This PR removes the dependency on the mega lens package and creates optics and friends using the microlens set of packages. The use of Prisms does necessitate the inclusion of profunctor but that is still a smaller price than all of lens.

The work is somewhat incomplete as there are a few incompatibilities to iron out.

Sean Chalmers added 5 commits June 10, 2024 13:17
Replace lens package with microlens packages and begin replacing the
types. Re-exporting the matching types and updated some uses in Waiter
and Error.
The use of throwingM and catching has been replaced with more basic
throw/catch behaviour. Some formatting changes appear to have been
applied as well.
Replace the IndexedTraversal on S3 traversal for microlens compat and
the Int is not required for this traversal.
@mankyKitty mankyKitty marked this pull request as ready for review October 15, 2024 09:54
@endgame endgame linked an issue Dec 10, 2024 that may be closed by this pull request
Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/4022d587cbbfd70fe950c1e2083a02621806a725?narHash=sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8%3D' (2023-12-04)
  → 'github:numtide/flake-utils/11707dc2f618dd54ca8739b309ec4fc024de578b?narHash=sha256-l0KFg5HjrsfsO/JpG%2Br7fRrqm12kzFHyUHqHCVpMMbI%3D' (2024-11-13)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/24fe8bb4f552ad3926274d29e083b79d84707da6?narHash=sha256-VwRTEKzK4wSSv64G%2Bg3RLF3t6yBHrhR2VK3kZ5UWisU%3D' (2024-01-07)
  → 'github:nixos/nixpkgs/dd51f52372a20a93c219e8216fe528a648ffcbf4?narHash=sha256-NQEO/nZWWGTGlkBWtCs/1iF1yl2lmQ1oY/8YZrumn3I%3D' (2024-12-08)
• Updated input 'pre-commit-hooks':
    'github:cachix/pre-commit-hooks.nix/ea96f0c05924341c551a797aaba8126334c505d2?narHash=sha256-qq8NbkhRZF1vVYQFt1s8Mbgo8knj%2B83%2BQlL5LBnYGpI%3D' (2024-01-08)
  → 'github:cachix/pre-commit-hooks.nix/d8c02f0ffef0ef39f6063731fc539d8c71eb463a?narHash=sha256-%2BXTFXYlFJBxohhMGLDpYdEnhUNdxN8dyTA8WAd%2Blh2A%3D' (2024-12-08)
• Updated input 'pre-commit-hooks/flake-compat':
    'github:edolstra/flake-compat/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9?narHash=sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm%2B504Ch3sNKLd8%3D' (2023-01-17)
  → 'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33?narHash=sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U%3D' (2023-10-04)
• Removed input 'pre-commit-hooks/flake-utils'
• Updated input 'pre-commit-hooks/gitignore':
    'github:hercules-ci/gitignore.nix/a20de23b925fd8264fd7fad6454652e142fd7f73?narHash=sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8%3D' (2022-08-14)
  → 'github:hercules-ci/gitignore.nix/637db329424fd7e46cf4185293b9cc8c88c95394?narHash=sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs%3D' (2024-02-28)
• Updated input 'pre-commit-hooks/nixpkgs-stable':
    'github:NixOS/nixpkgs/c37ca420157f4abc31e26f436c1145f8951ff373?narHash=sha256-otaSUoFEMM%2BLjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U%3D' (2023-06-03)
  → 'github:NixOS/nixpkgs/d063c1dd113c91ab27959ba540c0d9753409edf3?narHash=sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo%3D' (2024-11-04)
@endgame
Copy link
Collaborator

endgame commented Dec 11, 2024

Thank you for this, I've got it a lot closer. There's just a couple more things to fix and then hopefully I can hit merge - I should get to them in the next few days, fingers crossed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Break lens dependency
2 participants