question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breaking changes in 1.4.5 + missing changelog

See original GitHub issue

Hello,

I tried updating from 1.4.4 to 1.4.5, but all my tests fail with some variations of this message:

WARNING: '--some-filepath--/a.txt' is locked by another process, there are a few common causes for this:
	- Another application accesses this file:
		Nothing you can do about it, it's out of your control.
	- 2 instances of this application run simultaneously:
		Use SingleInstanceManager to restrict running more than one instance.
	- You are calling Update.finalizeUpdate() after launch() and files are already loaded onto JVM:
		Call Update.finalizeUpdate() before launch to complete the update process.
	- You are attempting to update a file that runs in the bootstrap application:
		Bootstrap dependencies cannot typically be updated. For services, leave
		the old in place, just release a newer version with a higher version
		number and make it available to the boot classpath or modulepath.
	- A file that's required in the business application was added to the boot classpath or modulepath:
		Much care must be taken that business application files should NOT be
		loaded in the boot, the JVM locks them and prevents them from being updated.

Are the breaking changes expected?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mordechaimcommented, Aug 17, 2020

This is a bug! This change explains it very well.

Used to be I would only check for file lock status, and only on Windows. But this change adds accessibility checks on other platforms as well. This explains why this happens when using 1.4.5 only.

I have to add a simple Files.createDirectories(path.getParent())

0reactions
Frozenlockcommented, Aug 17, 2020

No, the update fails.

The stacktrace:

        UnixException.java:   92  sun.nio.fs.UnixException/translateToIOException
        UnixException.java:  111  sun.nio.fs.UnixException/rethrowAsIOException
        UnixException.java:  116  sun.nio.fs.UnixException/rethrowAsIOException
UnixFileSystemProvider.java:  219  sun.nio.fs.UnixFileSystemProvider/newByteChannel
   FileSystemProvider.java:  478  java.nio.file.spi.FileSystemProvider/newOutputStream
                Files.java:  219  java.nio.file.Files/newOutputStream
                Files.java: 2919  java.nio.file.Files/newBufferedWriter
                Files.java: 2962  java.nio.file.Files/newBufferedWriter
            FileUtils.java:  208  org.update4j.util.FileUtils/verifyAccessible   ; <---------------------------
               Update.java:  115  org.update4j.Update/finalizeUpdate
                  core.clj:  109  easy-update.core/update/reify
           ConfigImpl.java:  224  org.update4j.ConfigImpl/doUpdate
        Configuration.java: 1242  org.update4j.Configuration/updateTemp
        Configuration.java: 1120  org.update4j.Configuration/updateTemp
NativeMethodAccessorImpl.java:   -2  jdk.internal.reflect.NativeMethodAccessorImpl/invoke0
NativeMethodAccessorImpl.java:   62  jdk.internal.reflect.NativeMethodAccessorImpl/invoke
DelegatingMethodAccessorImpl.java:   43  jdk.internal.reflect.DelegatingMethodAccessorImpl/invoke
               Method.java:  566  java.lang.reflect.Method/invoke
            Reflector.java:  167  clojure.lang.Reflector/invokeMatchingMethod
            Reflector.java:  102  clojure.lang.Reflector/invokeInstanceMethod
                  core.clj:  104  easy-update.core/update
                  core.clj:   84  easy-update.core/update
                  core.clj:   38  unit.core/-update
                  core.clj:   35  unit.core/-update
                      REPL:  298  unit.core/eval26921
                      REPL:  298  unit.core/eval26921
             Compiler.java: 7177  clojure.lang.Compiler/eval
             Compiler.java: 7132  clojure.lang.Compiler/eval
                  core.clj: 3214  clojure.core/eval
                  core.clj: 3210  clojure.core/eval
    interruptible_eval.clj:   91  nrepl.middleware.interruptible-eval/evaluate/fn
                  main.clj:  437  clojure.main/repl/read-eval-print/fn
                  main.clj:  437  clojure.main/repl/read-eval-print
                  main.clj:  458  clojure.main/repl/fn
                  main.clj:  458  clojure.main/repl
                  main.clj:  368  clojure.main/repl
               RestFn.java:  137  clojure.lang.RestFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj:  660  clojure.core/apply
                regrow.clj:   20  refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   84  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   56  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  155  nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
                  AFn.java:   22  clojure.lang.AFn/run
               session.clj:  190  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  189  nrepl.middleware.session/session-exec/main-loop
                  AFn.java:   22  clojure.lang.AFn/run
               Thread.java:  834  java.lang.Thread/run

As marked above the version 1.4.5 of finalizeUpdate replaced FileUtils.verifyNotLocked by FileUtils.verifyAccessible.

Also, I’ve noticed that the update will succeed without issues if I manually create all the sub-directories.

Read more comments on GitHub >

github_iconTop Results From Across the Web

karma/CHANGELOG.md at master - GitHub
BREAKING CHANGES. Karma plugins which rely on the fact that Karma uses Bluebird promises may break as Bluebird-specific API is no longer available...
Read more >
Changelog | Meteor API Docs
Great new features and no breaking changes (except one package deprecation). You can always check our Roadmap to understand what is next.
Read more >
Changelog | Cypress Documentation
Experimental Breaking Changes: Updates were made to enhance the cy.session() recovered error experience. With this change, cy.session() will no longer fail ...
Read more >
Stardew Valley 1.4 Update Full Changelog
Improved many translations and fixed missing font characters in Korean. Changed midnight from 12:00 to 0:00 in Japanese. Added an open sprite to...
Read more >
Changelog - Fortune
Fix: pulling from an array no longer reverses the order of the array. ... Breaking change: extracted IndexedDB, HTTP, and WebSocket implementations into ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found