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

How to handle non-text files #37

Open
Blarc opened this issue Apr 20, 2023 · 1 comment
Open

How to handle non-text files #37

Blarc opened this issue Apr 20, 2023 · 1 comment
Labels
question Further information is requested

Comments

@Blarc
Copy link
Owner

Blarc commented Apr 20, 2023

Need to test what happens when non-text files are used for computing the diff and consequently the commit message.

@Blarc Blarc added the question Further information is requested label Apr 27, 2023
@hablutzel1
Copy link

I've just got the following error:

com.intellij.openapi.vcs.VcsException: /Users/jhablutzel/Documents/wisekey_infrastructure/wisekey-docker-ejbca/ejbca/ejbca_ee_7_11_0.zip
	at com.intellij.openapi.vcs.changes.CurrentContentRevision.getContentAsBytes(CurrentContentRevision.java:46)
	at com.intellij.openapi.diff.impl.patch.IdeaTextPatchBuilder$BinaryAirContentRevision.getContentAsBytes(IdeaTextPatchBuilder.java:164)
	at com.intellij.openapi.diff.impl.patch.TextPatchBuilder.buildBinaryPatch(TextPatchBuilder.java:284)
	at com.intellij.openapi.diff.impl.patch.TextPatchBuilder.createPatch(TextPatchBuilder.java:89)
	at com.intellij.openapi.diff.impl.patch.TextPatchBuilder.build(TextPatchBuilder.java:72)
	at com.intellij.openapi.diff.impl.patch.TextPatchBuilder.buildPatch(TextPatchBuilder.java:60)
	at com.intellij.openapi.diff.impl.patch.IdeaTextPatchBuilder.buildPatch(IdeaTextPatchBuilder.java:93)
	at com.github.blarc.ai.commits.intellij.plugin.AICommitAction.computeDiff(AICommitAction.kt:99)
	at com.github.blarc.ai.commits.intellij.plugin.AICommitAction.access$computeDiff(AICommitAction.kt:24)
	at com.github.blarc.ai.commits.intellij.plugin.AICommitAction$actionPerformed$$inlined$runBackgroundableTask$default$1.run(progress.kt:36)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:429)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:480)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.intellij.openapi.util.io.FileTooBigException: /Users/jhablutzel/Documents/wisekey_infrastructure/wisekey-docker-ejbca/ejbca/ejbca_ee_7_11_0.zip
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.checkNotTooLarge(VirtualFileImpl.java:205)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:123)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:118)
	at com.intellij.openapi.vcs.changes.CurrentContentRevision.getContentAsBytes(CurrentContentRevision.java:43)
	... 29 more

Please ignore big files during the plugin processing. You could still take their names and their metadata (e.g. the file output).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants