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

Windows drive letter case bug persists #1197

Closed
lovettchris opened this issue May 30, 2022 · 1 comment
Closed

Windows drive letter case bug persists #1197

lovettchris opened this issue May 30, 2022 · 1 comment

Comments

@lovettchris
Copy link
Contributor

  • Rollup Plugin Name: typescript
  • Rollup Plugin Version: 8.3.2
  • Rollup Version: 2.74.0
  • Operating System (or Browser): Windows 11
  • Node Version: v16.14.0
  • Link to reproduction (⚠️ read below):

Related to issue #1133, the build still does not work properly even with @rollup/plugin-typescript": "^8.3.2", and rollup version 2.74.0 both of which include some fixes for this drive letter issue.

on windows:

  • make a "c:\Temp" folder and cd into that folder and make sure node.js returns the opposite case:
    path = require('path')
    path.resolve('.')  // returns the string "C:\\Temp" (notice the drive letter difference from your terminal window).
  • git clone git@github.com:leanprover/vscode-lean4.git
  • git checkout clovett/fix_drive_letter_case_bug
  • npm install
  • npx lerna bootstrap
  • npx lerna run build

Expected Behavior

Should just work.

Actual Behavior

[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
../../../../../D:/git/leanprover/vscode-lean4/lean4-infoview/src/infoview/main.tsx (3:12)
1: import * as React from 'react';
2: import * as ReactDOM from 'react-dom';
3: import type { DidCloseTextDocumentParams, Location, DocumentUri } from 'vscode-languageserver-protocol';
               ^
4:
5: import 'tachyons/css/tachyons.css';
Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
    at error (d:\git\leanprover\vscode-lean4\lean4-infoview\node_modules\rollup\dist\shared\rollup.js:198:30)
    at Module.error (d:\git\leanprover\vscode-lean4\lean4-infoview\node_modules\rollup\dist\shared\rollup.js:12723:16)
    at Module.tryParse (d:\git\leanprover\vscode-lean4\lean4-infoview\node_modules\rollup\dist\shared\rollup.js:13100:25)
    at Module.setSource (d:\git\leanprover\vscode-lean4\lean4-infoview\node_modules\rollup\dist\shared\rollup.js:13005:24)
    at ModuleLoader.addModuleSource (d:\git\leanprover\vscode-lean4\lean4-infoview\node_modules\rollup\dist\shared\rollup.js:22479:20)

Note it works fine if you create a new terminal window and run "pushd D:\temp" with upper case matching what nodejs returns from path.resolve. But the code should not be sensitive to case like this since Windows file system is case insensitive.

Additional Information

@shellscape
Copy link
Collaborator

Thanks for opening an issue. Citing the issue template:

🚨 Issues WITHOUT a valid reproduction WILL BE CLOSED!

Please provide one by:

  1. Using the REPL.it plugin reproduction template at https://repl.it/@rollup/rollup-plugin-repro
  2. Provide a minimal repository link (Read https://git.io/fNzHA for instructions).
    Please use NPM for installing dependencies!
    These may take more time to triage than the other options.
  3. Using the Rollup REPL at https://rollupjs.org/repl/

⚠️ ZIP Files are unsafe and maintainers will NOT download them.

The reproduction you provided is very far from minimal. If you'd like some guidance on what we consider minimal to be, please read the link provided above. We're very short on maintainer help and with what little time we do have, we cannot dive large repositories for triage. Please ping when you have a reproduction that matches our expectations and we'll be happy to reopen.

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

No branches or pull requests

2 participants