Skip to content

chore:remove symlink for windows #9410

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

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

Conversation

ss0526100
Copy link
Contributor

@ss0526100 ss0526100 commented Jul 11, 2025

This PR continues the context of #9346.

Resolved Windows symbolic link issue (#9272) across all packages.

  • Changed all symbolic links to relative paths.
  • Unified eslint-plugin-query's separate configuration to relative path imports (see comments).
  • Source map files were generated during Windows build in scripts/tsup.config.js and the root folder's eslint.config.js. Added generated source map file information to .gitignore to resolve this.

ss0526100 added 28 commits July 2, 2025 12:18
Copy link

nx-cloud bot commented Jul 11, 2025

View your CI Pipeline Execution ↗ for commit 2af4646

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 1m 4s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2025-07-12 07:43:49 UTC

Copy link

pkg-pr-new bot commented Jul 11, 2025

More templates

@tanstack/angular-query-devtools-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@9410

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@9410

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@9410

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@9410

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@9410

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@9410

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@9410

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@9410

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@9410

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@9410

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@9410

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@9410

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@9410

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@9410

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@9410

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@9410

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@9410

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@9410

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@9410

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@9410

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@9410

commit: 2af4646

Copy link

codecov bot commented Jul 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.39%. Comparing base (2bc52bf) to head (2af4646).
Report is 53 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #9410      +/-   ##
==========================================
+ Coverage   45.37%   45.39%   +0.01%     
==========================================
  Files         207      208       +1     
  Lines        8277     8279       +2     
  Branches     1869     1864       -5     
==========================================
+ Hits         3756     3758       +2     
  Misses       4080     4080              
  Partials      441      441              
Components Coverage Δ
@tanstack/angular-query-devtools-experimental ∅ <ø> (∅)
@tanstack/angular-query-experimental 85.00% <ø> (ø)
@tanstack/eslint-plugin-query 83.24% <ø> (ø)
@tanstack/query-async-storage-persister 43.85% <ø> (ø)
@tanstack/query-broadcast-client-experimental 24.39% <ø> (ø)
@tanstack/query-codemods 0.00% <ø> (ø)
@tanstack/query-core 98.15% <ø> (ø)
@tanstack/query-devtools 3.55% <ø> (ø)
@tanstack/query-persist-client-core 79.47% <ø> (ø)
@tanstack/query-sync-storage-persister 84.61% <ø> (ø)
@tanstack/query-test-utils 77.77% <ø> (ø)
@tanstack/react-query 95.95% <ø> (+0.02%) ⬆️
@tanstack/react-query-devtools 10.00% <ø> (ø)
@tanstack/react-query-next-experimental ∅ <ø> (∅)
@tanstack/react-query-persist-client 100.00% <ø> (ø)
@tanstack/solid-query 78.13% <ø> (ø)
@tanstack/solid-query-devtools ∅ <ø> (∅)
@tanstack/solid-query-persist-client 100.00% <ø> (ø)
@tanstack/svelte-query 88.07% <ø> (ø)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client 100.00% <ø> (ø)
@tanstack/vue-query 71.10% <ø> (ø)
@tanstack/vue-query-devtools ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

legacyConfig({ entry: ['src/*.ts'] }),
{
...modernConfig({ entry: ['src/*.ts'] }),
external: ['typescript'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In eslint-plugin-query, applying the parent-level esbuildPlugin settings directly caused build failures.
To address this, previous versions used a modified copy of scripts/getTsupConfig.js instead of the original.
Considering potential future changes to getTsupConfig, this issue needed to be handled.
Thus, scripts/getTsupConfig.js was imported using a relative path, and settings specific to eslint-plugin-query were added separately.

Copy link
Collaborator

@TkDodo TkDodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thinking about this some more - we already have a package called query-test-utils that exports some utils for testing so that we don’t have to duplicate them for various adapters.

couldn’t we put the shared configs there too and just import them through the workspace dependency ?

@ss0526100
Copy link
Contributor Author

Got it. Similar to method 2 in #9272.

I'll implement it that way.

@arnoud-dv
Copy link
Collaborator

Using symlinks makes it less likely for dependencies such as Vite to resolve to the wrong version as opposed to importing stuff outside the workspace. I often encountered this:

  • Update Angular which uses Vite internally
  • Suddenly vue-query gets type errors because of conflicting Vite and Vitest versions

This is very time consuming and distracting.

Perhaps using a dedicated package with its own dependencies will be a good solution but let's keep this in mind. I think the current symlinks are an elegant method to resolve dependencies such as Vite to the proper workspace version.

It's been a while since I developed on Windows, but I think it supports symlinks very well on:

  • Windows Subsystem for Linux / WSL
  • devdrive
  • Less convenient, but NTFS when configuring this Git setting: git config --global core.symlinks true. For some reason Windows requires an account with elevated permissions to create symlinks on NTFS though.

@ss0526100
Copy link
Contributor Author

ss0526100 commented Jul 13, 2025

You're right. I'm also developing in a Windows environment, but I'm able to write code without issues by using WSL.

However, if we keep the existing symlinks, we'll need to update the CONTRIBUTING.md document. A few people, including myself, have had problems when first trying to modify Tanstack Query's code on Windows.

This seems to be a matter of choice:

  • Stick with the current code.
    • In this case, the CONTRIBUTING.md document should recommend against developing on enviroments that don't support symlinks.
  • Use this Pull Request (PR) as is.
  • Create a separate package for shared configurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment