You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/11/28 21:56:20 UTC
[GitHub] [netbeans] eirikbakke opened a new pull request, #5027: [NETBEANS-1914] Fix startup problems on Windows after moving NetBeans install directory
eirikbakke opened a new pull request, #5027:
URL: https://github.com/apache/netbeans/pull/5027
On Windows, renaming or moving the NetBeans installation directory caused errors on startup, due to references to old paths in all-layers.dat in the cache directory. The bug did not seem to happen on Linux or MacOS; I'm not sure why. See https://issues.apache.org/jira/browse/NETBEANS-1914 for an example stack trace.
The solution in this patch is to include the netbeans.home path in the all-checksum.txt file. This will invalidate the cache if the installation directory is changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] [NETBEANS-1914] Fix startup problems on Windows after moving NetBeans install directory [netbeans]
Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke merged PR #5027:
URL: https://github.com/apache/netbeans/pull/5027
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] eirikbakke commented on pull request #5027: [NETBEANS-1914] Fix startup problems on Windows after moving NetBeans install directory
Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #5027:
URL: https://github.com/apache/netbeans/pull/5027#issuecomment-1685133737
I have now updated this patch to apply the workaround on Windows only, and to fix the resulting broken tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] eirikbakke commented on pull request #5027: [NETBEANS-1914] Fix startup problems on Windows after moving NetBeans install directory
Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #5027:
URL: https://github.com/apache/netbeans/pull/5027#issuecomment-1640373414
Recap of this PR:
1) On Windows, if the user moves the NetBeans install directory, NetBeans will fail to start, because the cache directory contains some absolute paths to files in the NetBeans install directory. This is a bug, because the cache directory is not supposed to contain absolute paths (we know this since @jtulach once wrote a testCachesDontUseAbsolutePaths test).
2) The fix to the bug in (1) would be to eliminate the absolute paths, but I looked into that and couldn't figure out how.
3) This PR takes a different approach: Just make sure the cache directory gets invalidated whenever the installation path changes. I think that's a good idea in any case; moving the install directory is a rare occurrence, except maybe if running from a USB drive where drive letters change or such.
4) As it happens, this PR itself fails the testCachesDontUseAbsolutePaths test because the invalidation is done by adding the absolute install path to the all-checksum.txt file. But I can just make it pass by allowing that particular occurrence of the absolute path, in all-checksum.txt only.
Unless @jtulach disagrees, my inclination here would be to fix the failing test by adjusting testCachesDontUseAbsolutePaths to allow the absolute path in all-checksum.txt .
The main possible objection here would be in giving up the "feature" of being able to move the NetBeans install directory without invalidating the cache directory. (I think that's acceptable, in return for eliminating a whole class of bugs that make NetBeans permanently un-startable.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] neilcsmith-net commented on pull request #5027: [NETBEANS-1914] Fix startup problems on Windows after moving NetBeans install directory
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5027:
URL: https://github.com/apache/netbeans/pull/5027#issuecomment-1640386437
> The main possible objection here would be in giving up the "feature" of being able to move the NetBeans install directory without invalidating the cache directory.
I think that might be OK, although it would be a pain for AppImages as the "install directory", well netbeans.home, moves every time you run. As you mention Linux and macOS don't have this issue, so could we target only Windows for this temporary fix? I say temporary, as 1. seems to be something that should be looked at - have seen that issue affect something else in a platform app.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] mbien commented on pull request #5027: [NETBEANS-1914] Fix startup problems on Windows after moving NetBeans install directory
Posted by GitBox <gi...@apache.org>.
mbien commented on PR #5027:
URL: https://github.com/apache/netbeans/pull/5027#issuecomment-1329908368
the tests don't want absolute paths in the file.
```
at org.netbeans.core.startup.layers.CachingPreventsFileTouchesTest.assertFileDoesNotContain(CachingPreventsFileTouchesTest.java:200)
at org.netbeans.core.startup.layers.CachingPreventsFileTouchesTest.testCachesDontUseAbsolutePaths(CachingPreventsFileTouchesTest.java:166)
at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:77)
at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:476)
at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:402)
at java.lang.Thread.run(Thread.java:750)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] [NETBEANS-1914] Fix startup problems on Windows after moving NetBeans install directory [netbeans]
Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #5027:
URL: https://github.com/apache/netbeans/pull/5027#issuecomment-1792571725
I'll merge this in, say, 14 days, if there are no objections.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] eirikbakke commented on pull request #5027: [NETBEANS-1914] Fix startup problems on Windows after moving NetBeans install directory
Posted by GitBox <gi...@apache.org>.
eirikbakke commented on PR #5027:
URL: https://github.com/apache/netbeans/pull/5027#issuecomment-1329937102
Hmm, I think that test is trying to catch the absolute paths that caused the problem in the first place (in files other than the checksum). Here was the discussion around the change that introduced this test:
https://bz.apache.org/netbeans/show_bug.cgi?id=208749
While getting rid of absolute paths from the cache is good, it seems like good hygiene to flush the cache when the installation directory changes in any case. Would be useful to get @jtulach's opinion here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] neilcsmith-net commented on pull request #5027: [NETBEANS-1914] Fix startup problems on Windows after moving NetBeans install directory
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5027:
URL: https://github.com/apache/netbeans/pull/5027#issuecomment-1638303635
What's the status of this PR? It's bumped through two milestones now - should either review / fix / merge, or close.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] eirikbakke commented on pull request #5027: [NETBEANS-1914] Fix startup problems on Windows after moving NetBeans install directory
Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #5027:
URL: https://github.com/apache/netbeans/pull/5027#issuecomment-1640419997
> although it would be a pain for AppImages as the "install directory", well netbeans.home, moves every time you run
Oh, that's a great point. Yeah, I could make the fix Windows-specific.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists