jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Build fails on Windows when the user account name contains a space

Open shreyo2005 opened this issue 3 months ago • 11 comments

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Windows 11 x64

Checked with the latest development build (copy version output from About dialog)

  • [x] I made a backup of my libraries before testing the latest development version.
  • [x] I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. On a Windows account whose username contains a space (e.g. C:\Users\firstname lastname)
  2. Clone the repository
  3. Run .\gradlew assemble

Appendix

...

Log File

> Task :jablib:generateJournalListMV
JBang not found. Checking cached version 0.141.0
JBang not found. Downloading version 0.141.0
Downloading https://github.com/jbangdev/jbang/releases/download/v0.141.0/jbang-0.141.0.zip
.10%.20%.30%..40%.50%.60%.70%..80%.90%.100%
Executing JBang command: C:\Users\shreyoshi laik\.gradle\caches\jbang\jbang-0.141.0\bin\jbang.cmd run "C:\dev\jabref\build-support\src\main\java\JournalListMvGenerator.java"

'C:\Users\shreyoshi' is not recognized as an internal or external command,
operable program or batch file.

> Task :jablib:generateJournalListMV FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':jablib:generateJournalListMV' (registered in build file 'jablib\build.gradle.kts').
> Error while executing JBang. Exit code: 1

BUILD FAILED in 1m 53s
25 actionable tasks: 1 executed, 24 up-to-date

shreyo2005 avatar Sep 01 '26 19:09 shreyo2005

Filed as https://github.com/jbangdev/jbang-gradle-plugin/issues/28 in jbang-gradle-plugin (upstream bug as the executable command is unquoted). cc @koppor

@shreyo2005 for now as a workaround please install and use jbang locally.

subhramit avatar Sep 01 '26 21:09 subhramit

@shreyo2005 Why didn't you follow https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/pre-03-code.html#clone-your-forked-repository-on-your-local-machine ?

Why do you think we demand c:\git-repositories?

You did not say why you did not follow our rules.

koppor avatar Sep 01 '26 22:09 koppor

I hadn't found that page , I went from the README to the build instructions and missed the workspace setup guide. My apologies.

To clarify the technical point though: my clone path (C:\dev\jabref) contains no whitespace or special characters. The unquoted path is the JBang cache, which lives under the Windows user directory (C:\Users\shreyoshi laik.gradle\caches\jbang) regardless of where the repository is cloned. I tried redirecting it with both GRADLE_USER_HOME and JBANG_DIR and neither moved it.

Thanks @subhramit for filing upstream , installing JBang locally as suggested. Will definitely follow the workspace guide going forward.

shreyo2005 avatar Sep 02 '26 07:09 shreyo2005

I hadn't found that page , I went from the README to the build instructions and missed the workspace setup guide. My apologies.

Please provide deep links and screenshots.

And then you are welcome to file a PR.

Maybe we should only point to CONTRIBUTING.md from README.md - Otherwise, links could go wrong as we see here.

koppor avatar Sep 02 '26 07:09 koppor

Sure , retracing my steps now, will post the links and screenshots shortly.

shreyo2005 avatar Sep 02 '26 08:09 shreyo2005

"Want to be part of...."

Can you not read?

You never read contributing.md, didn't you

If you are a newcomer, the two most helpful sections to navigate through are the guidelines for setting up a local workspace (to get JabRef's source code into your local machine and get the development version running), and frequently asked questions - where you will find solutions to issues that are most commonly faced by new contributors.

pluto-han avatar Sep 02 '26 09:09 pluto-han

The failure is in the JBang cache path under the Windows user directory, neither the workspace guide nor the FAQ covers this failure. it's a plugin bug, filed upstream as jbangdev/jbang-gradle-plugin#28. That being said i would keep in mind the advice you just gave so that i am able to solve the issues which are solvable from my side .

shreyo2005 avatar Sep 02 '26 11:09 shreyo2005

"Contributing" and "Building from Source" as sibling sections with nothing indicating which applies to a contributor.

Hey, usually we are very accommodative of newcomers but it is very alarming how you start the sentence with "Contributing" being one section in the readme and then end it with "with nothing indicating which applies to a contributor." We use English as the primary mode of communication in JabRef, and have written all our docs in that language. If you are unable to comprehend that language, you won't be able to do much here.

The failure is in the JBang cache path under the Windows user directory, neither the workspace guide nor the FAQ covers this failure. it's a plugin bug, filed upstream as jbangdev/jbang-gradle-plugin#28.

That is a separate thing, and we are mixing contexts here. That is a fair bug, and I gave you a solution for it as well, I don't know why you're bringing that up again. Now the discussion was about setting up your local development environment.

subhramit avatar Sep 02 '26 11:09 subhramit

Even if you end up reaching the building from source page, in your screenshot itself the first paragraph directs you what to do if you are a developer. I will read it out to you (section taken from your screenshot):

Image

"This method is mainly for package maintainers and users who would like to build the latest snapshots of JabRef directly from the source. If you want to setup JabRef for development, follow the instructions for setting up a workspace"

Please google the words "package maintainer", "user" and "developer", and try to find out the difference between them.

That section does link to the workspace setup guide in its second sentence, but then gives complete working build commands immediately below, so it reads as self-sufficient and I followed it without clicking through.

If there is a sentence that says "If you want to setup JabRef for development, follow the instructions for ...", which part of it is not understandable to you? Do you read pages bottom to top instead of top to bottom? What made you assume that even if we have given a link to an explicit guide to set up jabref for developers, the "rest" of the page is "self sufficient" and that link is not at all necessary?

subhramit avatar Sep 02 '26 11:09 subhramit

Also, please refrain from using AI to communicate. It's against our code of conduct. Please go through that as well.

subhramit avatar Sep 02 '26 11:09 subhramit

i understand my fault here now , not being able to comprehend the document properly is entirely on my part and i apologise for that . I will try to work on good issues in the upcoming months.

Being new to this repository , i should have spent more time trying to understand it well.

i have been working on the fix you suggested , thank you for filing it upstream and giving me the fix.

shreyo2005 avatar Sep 02 '26 12:09 shreyo2005