Skip to content

Conversation

sandydoo
Copy link
Member

@sandydoo sandydoo commented Aug 2, 2025

We can query the options attrset directly instead of using custom outputs.

In case anyone is depending on these (for whatever reason), there will be a brief deprecation period.

Copy link
Contributor

github-actions bot commented Aug 2, 2025

🔍 Suggested Reviewers

Based on git blame analysis of the changed lines, the following contributors have significant experience with the modified code:

Please consider reviewing this PR as you have authored significant portions of the code being modified. Your expertise would be valuable! 🙏

This comment was automatically generated by git-blame-auto-reviewer

Last updated: 2025-08-02T13:21:57.457Z

Copy link
Contributor

claude bot commented Aug 2, 2025

Claude finished @sandydoo's task —— View job


PR Review: Deprecate Feature Detection Output Flags

Review Tasks

  • Analyze changes in devenv/src/flake.tmpl.nix
  • Analyze changes in src/modules/flake.nix
  • Review deprecation strategy and messaging
  • Check for potential breaking changes or migration issues
  • Provide feedback on code quality and best practices
  • Final review summary

Issues and Improvements

1. Shortened Deprecation Period
The deprecation warnings added in commit 059b2e6 were immediately removed in 42242d8, providing effectively zero deprecation period. While the PR description mentions "a brief deprecation period," users had no opportunity to see the warnings in a released version.

Recommendation: Consider keeping the deprecation warnings for at least one release cycle to give downstream users time to migrate.

2. Missing Documentation of Migration Path
The code change is correct - checking options.devenv directly is indeed more robust than using custom outputs. However, there's no clear documentation showing users how to migrate.

Example of what users need to change:

# Old approach (no longer works)
inputs.devenv.isTmpDir or false

# New approach (works correctly)
builtins.hasAttr "tmpdir" config.devenv

3. Code Quality - Good Consolidation
The refactoring in devenv/src/flake.tmpl.nix:76-91 is well-executed:

  • ✅ Consolidates all conditional devenv settings into a single module
  • ✅ Uses lib.mkMerge appropriately for combining config fragments
  • ✅ Consistent pattern with builtins.hasAttr checks
  • ✅ Cleaner separation of concerns

4. Potential Runtime vs Build-time Issue
The old approach (inputs.devenv.isTmpDir) was available at evaluation time, while the new approach requires the module system to be evaluated. This could potentially affect some edge cases where early feature detection was needed.

5. Minor: Missing Runtime Option
In the old code, runtime was coupled with tmpdir checking, but in the new version at line 86, runtime gets its own separate hasAttr check. This is more correct but worth noting the behavioral change.


Summary

The technical implementation is solid and represents a cleaner architecture. The main concerns are around the migration experience:

  • Breaking change without adequate deprecation period
  • Missing migration documentation
  • No backwards compatibility bridge

For future similar changes, consider:

  1. Longer deprecation periods with clear warnings
  2. Documentation showing before/after examples
  3. Potentially providing a compatibility shim for one release cycle

The code quality itself is good - the consolidation improves maintainability and the direct option checking is more reliable than the previous feature flag approach.


Copy link

cloudflare-workers-and-pages bot commented Aug 2, 2025

Deploying devenv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 42242d8
Status: ✅  Deploy successful!
Preview URL: https://72982b85.devenv.pages.dev
Branch Preview URL: https://drop-output-feature-flags.devenv.pages.dev

View logs

We can query the options attrset directly instead of using custom outputs.

In case anyone is depending on these (for whatever reason), there will be a brief deprecation period.
@sandydoo sandydoo force-pushed the drop-output-feature-flags branch from 026708e to 059b2e6 Compare August 2, 2025 13:06
@domenkozar domenkozar merged commit 38eb368 into main Aug 2, 2025
261 of 278 checks passed
sandydoo pushed a commit that referenced this pull request Aug 21, 2025
devenv: deprecate feature detection output flags
sandydoo pushed a commit that referenced this pull request Aug 21, 2025
devenv: deprecate feature detection output flags
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.

2 participants