Author Topic: Keybinder v2 notes/problems  (Read 9792 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2235
Re: Keybinder v2 notes/problems
« Reply #45 on: April 06, 2020, 06:44:12 pm »
I think I've already found the problem. Still testing...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2235
Re: Keybinder v2 notes/problems
« Reply #46 on: April 07, 2020, 01:42:06 am »
I've lost my local bindings once more. Rev 12012 at the moment.

Would it be possible to implement storing only non-default bindings (the ones I've actually set (only 3 at the moment))?
It will make debugging this a bit easier.
When are keybindings applied? Can the plugin change bindings in the middle of the execution?
Would it be possible to print an error when reading the bindings fails?
My C::B is crashing a lot, so it might be corrupting the files, but I'm finding about this corrupting late.

Fixed Rev 12034
KeyBinder - More comparisons to sync. .conf to restructured menu tree, eg., when switching between CB builds using the same personality.

The debugger log will contain the changes or errors found by KeyBinder.

KeyBinder makes no changes during execution. Changes are made only at CB startup and from the users configuration UI.

I found a couple more bugs where KeyBinder did not convert the users key bindings when when the menu structure changed.
« Last Edit: April 07, 2020, 01:43:59 am by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #47 on: April 07, 2020, 07:36:13 pm »
Code: [Select]
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::cbKeyBinder()':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:75: undefined reference to `vtable for cbKeyBinder'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::~cbKeyBinder()':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:87: undefined reference to `vtable for cbKeyBinder'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::CreateKeyBindDefaultFile(bool)':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:478: undefined reference to `cbKeyBinder::GetTempOldFmtMnuScanFilename()'

My build failed with this. Also the build on travis has failed too https://travis-ci.org/github/obfuscated/codeblocks_sf/builds/671985456
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline blauzahn

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: Keybinder v2 notes/problems
« Reply #48 on: April 07, 2020, 09:35:19 pm »
oBFusCATed wrote:
Quote
My build failed with this.

Mine failed too with the same error messages.

wxwidgets trunk, Linux x86_64, tried on arch as well as on ubuntu. Same result.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2235
Re: Keybinder v2 notes/problems
« Reply #49 on: April 07, 2020, 11:57:51 pm »
Code: [Select]
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::cbKeyBinder()':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:75: undefined reference to `vtable for cbKeyBinder'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::~cbKeyBinder()':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:87: undefined reference to `vtable for cbKeyBinder'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::CreateKeyBindDefaultFile(bool)':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:478: undefined reference to `cbKeyBinder::GetTempOldFmtMnuScanFilename()'

My build failed with this. Also the build on travis has failed too https://travis-ci.org/github/obfuscated/codeblocks_sf/builds/671985456

I'm working on it.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #50 on: April 08, 2020, 01:32:17 am »
I don't know what you've done, but the last commit broke the eol characters in git. They are now the windows style on linux. This is something which must not happen. Can you try to fix it? I suppose the same problem is happening with svn.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2235
Re: Keybinder v2 notes/problems
« Reply #51 on: April 08, 2020, 08:34:42 am »
I don't know what you've done, but the last commit broke the eol characters in git. They are now the windows style on linux. This is something which must not happen. Can you try to fix it? I suppose the same problem is happening with svn.

How do I fix it? I commit from windows. Is windows suppose to have only a linefeed?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2235
Re: Keybinder v2 notes/problems
« Reply #52 on: April 08, 2020, 09:13:38 am »
I don't know what you've done, but the last commit broke the eol characters in git. They are now the windows style on linux. This is something which must not happen. Can you try to fix it? I suppose the same problem is happening with svn.

How do I fix it? I commit from windows. Is windows suppose to have only a linefeed?

On linux, I've run all .h and .cpp thru Dos2Unix.
Should I now just commit those changes from linux?
« Last Edit: April 08, 2020, 09:33:15 am by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #53 on: April 08, 2020, 10:16:03 am »
Not sure. There is property for eol in svn. Probably you should set it first. Read svn docs.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline blauzahn

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: Keybinder v2 notes/problems
« Reply #54 on: April 08, 2020, 11:00:09 am »
Having accidentially changed eol happened to us as well. This was in our project with mercurial which is not to blame.

Rather it was my fault. Running Linux, I mounted the Windows partition and committed the changes in the tree lying on the Windows partition I had made before when running Windows. Having experienced that, we avoid now committing when running Linux a source tree which is on an NTFS partition or mounted via Samba.

Now, we have set the appropriate property in the mercurial repo. Maybe, this is enough. Nevertheless, we now always commit on Windows when we have made changes on Windows and on Linux when we have made changes on Linux. Merging back and forth is fine then. This workflow is definitely not elegant but is KISS and works quite reliably.

Dos2Unix does work if the files are on some Linux partition. Of course, you can change files on a windows partition as well with it. But then the OS might interfere when committing and it is probably more error prone, especially if done manually.


Offline sodev

  • Regular
  • ***
  • Posts: 382
Re: Keybinder v2 notes/problems
« Reply #55 on: April 08, 2020, 05:49:04 pm »
Not sure if i understand your workflow correct, but you checkout a working copy on windows with windows tools, mount that on linux and modify that with linux tools? Now if thats not asking for trouble :o

Anyway, to prevent such eol issues with svn, either make sure you configured the autoprops in your svn client properly or use that server side autoprops feature of newer svn versions (this is specifying autoprops properties in the repository itself). Both will only work with new files beeing added though, for already present files you have to check if for them the eol-style is properly set. If not, adding that property should fix your eol next time you update and will prevent a commit if the files contain mixed eol already.

Offline blauzahn

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: Keybinder v2 notes/problems
« Reply #56 on: April 08, 2020, 06:44:38 pm »
sodev wrote:
Quote
Now if thats not asking for trouble

Yes, and that is how we learned not to do it anymore :)
We use Windows tools on Windows and LInux tools on Linux. Period.

The cross-border commit looked tempting at the beginning. When I had forgotten to commit a change on Windows I wondered whether I can avoid to reboot into Windows and reboot back to Linux when working without network on a single machine. The only tool used cross-border was the vcs (tortoisehg/mercurial on both sides) for the commit.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2235
Re: Keybinder v2 notes/problems
« Reply #57 on: April 08, 2020, 10:18:30 pm »
Linux will not let me commit.
I modified the offending files on windows and verified they were not mixed eol.
I committed them, but then updating them on linux still shows windows eols.

Code: [Select]
[email protected]:~/proj/cbBeta30/trunk/src/plugins/contrib/keybinder$ svn commit -m "- Keybinder - Convert windows CRLF to Linux LF"
svn: E170001: Commit failed (details follow):
svn: E170001: Authorization failed

Would someone who can commit from linux please do the following:

Code: [Select]
svn update
cd [to the keybinder plugin dir]
dos2unix *.h
dos2unix *.cpp
svn status -u #Just to see the changed filenames
svn commit -m "- KeyBinder - Convert CRLF to LF"

Thanks

dos2unix works well. I installed it with:
sudo apt install dos2unix
It will show what it will do without modifying the files with the command "dos2unix -ih *.h" etc.
To modify the eols leave out the "-ih"

« Last Edit: April 08, 2020, 10:33:05 pm by Pecan »

Offline sodev

  • Regular
  • ***
  • Posts: 382
Re: Keybinder v2 notes/problems
« Reply #58 on: April 08, 2020, 10:28:50 pm »
It says Authorization failed, if you didn't enter any credentials delete your stored authentication data (somewhere in .svn in your home directory, don't know exact location).

But you don't have to run these linux tools, simply set the svn:eol-style property to native on all source files and you get the conversion for free. Unless you have already mixed eol, that you can fix with e.g. Notepad++ easily on the windows side.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2235
Re: Keybinder v2 notes/problems
« Reply #59 on: April 08, 2020, 11:10:46 pm »
It says Authorization failed, if you didn't enter any credentials delete your stored authentication data (somewhere in .svn in your home directory, don't know exact location).

But you don't have to run these linux tools, simply set the svn:eol-style property to native on all source files and you get the conversion for free. Unless you have already mixed eol, that you can fix with e.g. Notepad++ easily on the windows side.

On Linux Mint19, there's a .subversion/auth/ folder. I deleted it, but commit still failed with "Authorization failed".