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

Attempt to convert a Git commit hash to Long #7133

Open
odisseus opened this issue Dec 6, 2024 · 0 comments
Open

Attempt to convert a Git commit hash to Long #7133

odisseus opened this issue Dec 6, 2024 · 0 comments
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: IntelliJ IntelliJ plugin type: bug

Comments

@odisseus
Copy link
Contributor

odisseus commented Dec 6, 2024

Description of the bug:

I'm getting this stack trace:

2024-12-06 14:17:11,921 [ 552040]   WARN - #com.google.idea.blaze.base.qsync.QuerySyncProjectData - For input string: "d6371d1e598f96616c4dcb885a7fd122aede818c"
java.lang.NumberFormatException: For input string: "d6371d1e598f96616c4dcb885a7fd122aede818c"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
	at java.base/java.lang.Long.parseLong(Long.java:709)
	at java.base/java.lang.Long.parseLong(Long.java:832)
	at com.google.idea.blaze.base.qsync.QuerySyncProjectData.lambda$getBlazeVersionData$5(QuerySyncProjectData.java:156)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at com.google.idea.blaze.base.qsync.QuerySyncProjectData.getBlazeVersionData(QuerySyncProjectData.java:153)
	at com.google.idea.blaze.base.sync.aspects.strategy.SyncAspectTemplateProvider.lambda$getLanguageStringMap$4(SyncAspectTemplateProvider.java:149)
	at java.base/java.util.Optional.map(Optional.java:260)
	at com.google.idea.blaze.base.sync.aspects.strategy.SyncAspectTemplateProvider.getLanguageStringMap(SyncAspectTemplateProvider.java:149)
	at com.google.idea.blaze.base.sync.aspects.strategy.SyncAspectTemplateProvider.writeLanguageInfos(SyncAspectTemplateProvider.java:124)
	at com.google.idea.blaze.base.sync.aspects.strategy.SyncAspectTemplateProvider.prepareProjectAspect(SyncAspectTemplateProvider.java:91)
	at com.google.idea.blaze.base.sync.aspects.strategy.SyncAspectTemplateProvider.onQuerySyncStart(SyncAspectTemplateProvider.java:62)
	at com.google.idea.blaze.base.qsync.QuerySyncProject.sync(QuerySyncProject.java:263)
	at com.google.idea.blaze.base.qsync.QuerySyncProject.syncWithCurrentSnapshot(QuerySyncProject.java:254)
	at com.google.idea.blaze.base.qsync.QuerySyncProject.deltaSync(QuerySyncProject.java:250)
	at com.google.idea.blaze.base.qsync.QuerySyncManager.lambda$deltaSync$1(QuerySyncManager.java:282)
	at com.google.idea.blaze.base.qsync.QuerySyncManager.lambda$createAndSubmitRunTask$2(QuerySyncManager.java:383)

The problem lies in this line, which attempts to convert a Git commit hash to Long. First of all, it uses the wrong method. Second, a commit hash is 20 bytes long and won't fit into Java's Long type, which is 8 bytes.

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

This seems to happen during project sync.

Which Intellij IDE are you using? Please provide the specific version.

IntelliJ Idea 243.21565.193

What programming languages and tools are you using? Please provide specific versions.

Java

What Bazel plugin version are you using?

Custom version based on b0466bb

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: IntelliJ IntelliJ plugin type: bug
Projects
Status: Untriaged
Development

No branches or pull requests

6 participants