Skip to content
TheChatArchiveThe Chat Archive
fable-5· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

False positive unused file for Vercel vercel.ts config What happened? fallow dead-code…

  1. User

    False positive unused file for Vercel vercel.ts config

    What happened?

    fallow dead-code reports apps/web/vercel.ts as an unused file, but Vercel treats vercel.ts as a project configuration file that is discovered and executed by convention.

    The file is not imported by application source, so it looks unused to a pure import graph. It should be treated as a Vercel config entrypoint.

    Vercel docs say:

    The @vercel/config package also treats vercel.ts as the config input:

    Because Vercel discovers this file by convention, Fallow should not report it as unused.

    Reproduction

    Create an app/workspace with a package.json like:

    {
      "name": "@example/web",
      "private": true,
      "type": "module",
      "scripts": {
        "build": "next build",
        "env-pull": "vercel env pull"
      },
      "devDependencies": {
        "@vercel/config": "latest",
        "vercel": "latest"
      }
    }
    

    Create vercel.ts at the app root:

    import type { VercelConfig } from '@vercel/config/v1';
    
    export const config = {
      regions: ['dub1'],
      fluid: true,
      installCommand: 'pnpm install --filter @example/web...',
      devCommand: 'next dev --port 3000',
      crons: [
        {
          path: '/api/jobs/run',
          schedule: '*/5 * * * *',
        },
      ],
    } satisfies VercelConfig;
    

    Run:

    fallow dead-code
    

    vercel.ts is reported as an unused file.

    Expected behavior

    Fallow should treat Vercel programmatic config files as used config entrypoints when Vercel is active.

    At minimum, the Vercel plugin/config detection should mark these app-root files as always used:

    • vercel.ts
    • vercel.js
    • vercel.mjs
    • vercel.cjs
    • vercel.mts

    A fix could add these to the relevant Vercel plugin config/always-used patterns, similar to how other framework config files are protected from unused-file reporting.

    Fallow version

    2.85.0

    Operating system

    macOS

    Configuration

    Interface

    No new interfaces are introduced.

  2. Assistant

    Now let me check how always_used patterns are matched (root vs. workspace-relative), since the report is for apps/web/vercel.ts in a workspace:

  3. Assistant

    Now let me check where the plugin count / plugin lists are asserted or documented:

  4. Assistant

    I have the full picture now. Let me check how plugin modules are declared in mod.rs:

  5. Assistant

    Now I'll write the Vercel plugin:

  6. Assistant

    Now register the module and add it to the builtin list:

  7. Assistant

    Now check whether extract_imports captures type-only imports (the issue's repro only has import type):

  8. Assistant

    Now add the integration tests to frameworks.rs:

  9. Assistant

    Now build and run the tests:

  10. Assistant

    All 8 tests pass. Let me verify end-to-end with the actual CLI against the repro fixture, and run fmt/clippy:

  11. Assistant

    vercel.ts is now a plugin entry point, controls still detected. Now update the plugin-count references:

  12. Assistant

    Now run the full workspace test suite:

  13. Assistant

    The shell appears unable to spawn processes right now — likely resource pressure from the background workspace build. Let me check the background task's progress:

  14. Assistant

    The workspace test suite is still building in the background, and the foreground shell can't spawn processes while it runs. I'll wait for the background task to complete.

  15. Assistant

    Waiting for the workspace test suite (byercg971) to finish — I'll verify the results and complete the remaining checks (fmt check, final summary) when it completes.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.