New Contributions for API exporting

31 views
Skip to first unread message

Mike Fenney

unread,
May 29, 2026, 1:22:40 PM (5 days ago) May 29
to Subsurface Divelog
Hi, I've been writing a new API export route for subsurface to export to divelogs.com
I started this a couple of months ago based on the current master but had to put it down for a while. I just picked it up and have it nearly complete and ready to submit a pull request but have an issue.
As a new contributor I do not have any rights to generate a pull request, is that something I can request?
I'm also basing the pull request off the latest version of master which I'm assuming is the right thing to do?
I've also found this a little challenging as C++ is not my normal language but I think I have everything constructed correctly. Hoping someone more knowledgable can do a quick code review when I do the pull request to check everything over.

Michael Keller

unread,
May 30, 2026, 1:57:40 AM (5 days ago) May 30
to subsurfac...@googlegroups.com
Hi Mike.


On 30/05/2026 04:49, 'Mike Fenney' via Subsurface Divelog wrote:
> Hi, I've been writing a new API export route for subsurface to export
> to divelogs.com.
> I started this a couple of months ago based on the current master but
> had to put it down for a while. I just picked it up and have it nearly
> complete and ready to submit a pull request but have an issue.


Nice. I hope you are aware of the work that's already been done in
https://github.com/subsurface/subsurface/pull/4636 to move us to the new
API?


> As a new contributor I do not have any rights to generate a pull
> request, is that something I can request?


This shouldn't be the case - you should be able to open a pull request
from the branch in your fork containing your work into
`subsurface/master`after selecting 'open pull request into a different
fork' in the pull request UI.

What is the URL for the branch with your work?


> I'm also basing the pull request off the latest version of master
> which I'm assuming is the right thing to do?


Yes, definitely.


> I've also found this a little challenging as C++ is not my normal
> language but I think I have everything constructed correctly. Hoping
> someone more knowledgable can do a quick code review when I do the
> pull request to check everything over.


Yes, we'll definitely do that.


Ngā mihi

  Michael Keller

Mike Fenney

unread,
May 30, 2026, 5:34:48 PM (4 days ago) May 30
to Subsurface Divelog
Thanks for getting back to me so quickly Michael.

On Saturday, May 30, 2026 at 6:57:40 AM UTC+1 Michael Keller wrote:

Nice. I hope you are aware of the work that's already been done in
https://github.com/subsurface/subsurface/pull/4636 to move us to the new
API?


divelogs.com is a different web application to divelogs.de, so I'm adding this as a new integration route just below divelogs.de on the standard export dialog.
 

This shouldn't be the case - you should be able to open a pull request
from the branch in your fork containing your work into
`subsurface/master`after selecting 'open pull request into a different
fork' in the pull request UI.

What is the URL for the branch with your work?


Thank you for the guidance, I'd not created a fork! All done now though!
You can find the branch here:
 
> I've also found this a little challenging as C++ is not my normal
> language but I think I have everything constructed correctly. Hoping
> someone more knowledgable can do a quick code review when I do the
> pull request to check everything over.


Yes, we'll definitely do that.

I had this completed and successfully building a month ago on my Mac, but then had to complete the other side of the API on the divelogs.com web application. 

However, when I came back to the code this week and made a small change to stop pointing to my localhost test server it stopped building. I'm clearly showing my lack of knowledge with C++, as I'm slightly out of my depth. I have a feeling it might be a caching issue with my Mac that means it is erroring out during the build but I'm not sure. 

for info, the place in the build it is erroring out is...

[ 67%] Building CXX object core/CMakeFiles/subsurface_corelib.dir/settings/qPrefMedia.cpp.o
/Users/mikefenney/Documents/GitHub/subsurface/core/uemis-downloader.cpp:449:9: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
  449 |         return NULL;
      |                ^~~~
/Library/Developer/CommandLineTools/usr/lib/clang/21/include/__stddef_null.h:21:14: note: expanded from macro 'NULL'
   21 | #define NULL __null
      |              ^~~~~~
[ 67%] Building CXX object core/CMakeFiles/subsurface_corelib.dir/settings/qPrefPartialPressureGas.cpp.o
[ 67%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/subsurfacewebservices.cpp.o
1 error generated.
make[2]: *** [core/CMakeFiles/subsurface_corelib.dir/uemis-downloader.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 67%] Building CXX object core/CMakeFiles/subsurface_corelib.dir/settings/qPrefPrivate.cpp.o
[ 67%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/tab-widgets/TabDiveNotes.cpp.o
[ 68%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/tab-widgets/TabDiveExtraInfo.cpp.o
[ 68%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/tab-widgets/TabDiveEquipment.cpp.o
[ 68%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/tab-widgets/TabDiveInformation.cpp.o
[ 68%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/tab-widgets/TabDivePhotos.cpp.o
[ 69%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/tab-widgets/maintab.cpp.o
[ 69%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/tab-widgets/TabDiveStatistics.cpp.o
[ 69%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/tagwidget.cpp.o
[ 69%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/updatemanager.cpp.o
[ 69%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/mapwidget.cpp.o
[ 69%] Building CXX object desktop-widgets/CMakeFiles/subsurface_interface.dir/btdeviceselectiondialog.cpp.o
make[1]: *** [core/CMakeFiles/subsurface_corelib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 70%] Linking CXX static library libsubsurface_interface.a
[ 82%] Built target subsurface_interface
make: *** [all] Error 2


I need to keep digging into why this is now happening but in the mean time...

Is it possible for you to try building the branch and see if it works? - I think all the logic is complete.
 
Best Regards,

Mike

Michael Keller

unread,
Jun 2, 2026, 1:05:08 AM (yesterday) Jun 2
to subsurfac...@googlegroups.com
Hi Mike.

On Sun, 31 May 2026 at 09:34, 'Mike Fenney' via Subsurface Divelog <subsurfac...@googlegroups.com> wrote:
divelogs.com is a different web application to divelogs.de, so I'm adding this as a new integration route just below divelogs.de on the standard export dialog.

Ha. The names are easy to confuse. 😛
 
Thank you for the guidance, I'd not created a fork! All done now though!
You can find the branch here:

I had this completed and successfully building a month ago on my Mac, but then had to complete the other side of the API on the divelogs.com web application. 

However, when I came back to the code this week and made a small change to stop pointing to my localhost test server it stopped building. I'm clearly showing my lack of knowledge with C++, as I'm slightly out of my depth. I have a feeling it might be a caching issue with my Mac that means it is erroring out during the build but I'm not sure. 

I just had a go at building (under linux) on your branch, and it built and ran out of the box - you'll possibly have to do a full rebuild to get this to work.

 Ngā mihi
  Michael Keller
--
GCS$/CC/E/IT d- s+ a C++ UL+++/S++ P L++ E-
W++ N o? K? w O(++) M-- V+ PS+ PE+ Y? PGP+ t
5? X R tv b++ DI++ D++ G e+++ h---- r+++ y+++

Mike Fenney

unread,
12:14 PM (4 hours ago) 12:14 PM
to Subsurface Divelog
Hi Michael,

On Tuesday, June 2, 2026 at 6:05:08 AM UTC+1 Michael Keller wrote:

I just had a go at building (under linux) on your branch, and it built and ran out of the box - you'll possibly have to do a full rebuild to get this to work.


yes that was it :-)

Great, so I'm going to do some final testing with large volume datasets to the production server to check if I need to enhance the status messages. Once I have that done, I'll raise a pull request on the final branch.

Do I need to let you/others know once I have done that?

Best Regards,

Mike

Dirk Hohndel

unread,
12:31 PM (4 hours ago) 12:31 PM
to subsurfac...@googlegroups.com

> On Jun 3, 2026, at 09:14, 'Mike Fenney' wrote:
>
>
> Great, so I'm going to do some final testing with large volume datasets to the production server to check if I need to enhance the status messages. Once I have that done, I'll raise a pull request on the final branch.
>
> Do I need to let you/others know once I have done that?

No, the maintainers get automatically notified of new pull requests

/D

Reply all
Reply to author
Forward
0 new messages