Recent

Author Topic: How future "safe" is Carbon - anyone knows?  (Read 49744 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: How future "safe" is Carbon - anyone knows?
« Reply #60 on: July 11, 2018, 11:16:27 am »
I just tried building Laz with trunk (x64 Cocoa), and it won't compile  :P

Hangs on pseudoterminaldlg.

svn up again, fixed last night

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: How future "safe" is Carbon - anyone knows?
« Reply #61 on: July 11, 2018, 03:34:41 pm »
Martin_fr, still broken for me.

I'm only getting the one error now though: 213,45 - identifier idents no member "DevicePtyMaster"

I'd copy/paste the line, but the copy/paste functionality doesn't work in x64 Cocoa FPCUpDeluxe   :/


Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: How future "safe" is Carbon - anyone knows?
« Reply #62 on: July 11, 2018, 05:44:26 pm »
And I just got it working by rebuilding with
Code: Pascal  [Select][+][-]
  1. ./lazbuild --build-ide= --widgetset="Cocoa"
and now command+z works

Thanks!

cobata

  • New Member
  • *
  • Posts: 49
  • Programmer-analyst
    • COBATA Software - Research, Development, Testing, Consulting
Re: How future "safe" is Carbon - anyone knows?
« Reply #63 on: July 13, 2018, 11:39:37 pm »
Good work, Guys!

I am impressed!

I tried the version:
"Checked out revision 58509."

I wrote in Cocoa widget set "OpenPictureDialog is not openning?" topic.
COBATA Software - Research, Development, Testing, Consulting
https://www.COBATA.com/

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: How future "safe" is Carbon - anyone knows?
« Reply #64 on: August 20, 2018, 11:46:16 am »
How to learn what Carbon APIs are deprecated?

If I can compile my app in 64-bit with Cocoa widgetset, does it mean that all existing 64-bit Carbon APIs are not deprecated?

I have a large old Freepascal product which doesn't use LCL. It's hard work to check all the code in hundred of units to make sure that I didn't miss all deprecated Carbon APIs. My form is using Cocoa API.
« Last Edit: August 20, 2018, 08:11:49 pm by Igor Kokarev »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: How future "safe" is Carbon - anyone knows?
« Reply #65 on: August 20, 2018, 03:14:06 pm »
How to learn what Carbon APIs are deprecated?
Not every C-style function is part of Carbon.
I.e. CoreFoundation or CoreGraphics are C-style libraries, yet are not considered being a part of Carbon.

It's also worth noting that any unix or posix apis are not deprecated as well.
Even more Apple recommended those as alternative to Carbon APIs in their Carbon Deprecrecation document

If I can compile my app in 64-bit with Cocoa widgetset, does it mean that all existing 64-bit Carbon APIs are not deprecated?

I have a large old Freepascal product which doesn't use LCL. It's jard work to check all the code in hundred of units to make sure that I didn't miss all deprecated Carbon APIs. My form is using Cocoa API.
If you can compile an application for 64-bit, then it's likely you're already not using any Carbon API function.
(otherwise you would fail to link the app)
Another safe approach is to try out the app on Mojave. You should be able to get access to the beta version even now, by signing up for apple beta program

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: How future "safe" is Carbon - anyone knows?
« Reply #66 on: August 20, 2018, 08:28:05 pm »
Hi,

Many thanks for you reply!

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: How future "safe" is Carbon - anyone knows?
« Reply #67 on: August 20, 2018, 08:37:04 pm »
Many thanks for you reply!
You're welcome. Are there any plans for a new PixBuilder version? (any plans for macOS?)
any new products maybe?

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: How future "safe" is Carbon - anyone knows?
« Reply #68 on: August 20, 2018, 09:09:11 pm »
Hi,

I just thought that you're our old good friend! Your nickname :)

We're working on Mac 64-bit version of PTE. We hope to build Alpha version this autumn. Currently we're testing different parts of PTE on Mac (interface, video player, audio).

How you think, is it safe to use deprecated CoreServices APIs:

MPCreateSemaphore, MPDeleteSemaphore, MPCreateCriticalRegion, MPDeleteCriticalRegion, MPEnterCriticalRegion, MPExitCriticalRegion, MPCreateEvent

P.S. Last official version PTE 9 for Windows contains many improvements - new powerful editor of animations, slide styles, color effects, etc.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: How future "safe" is Carbon - anyone knows?
« Reply #69 on: August 20, 2018, 09:19:26 pm »
How you think, is it safe to use deprecated CoreServices APIs:

MPCreateSemaphore, MPDeleteSemaphore, MPCreateCriticalRegion, MPDeleteCriticalRegion, MPEnterCriticalRegion, MPExitCriticalRegion, MPCreateEvent
The sooner you switch away from them the better.

Multiprocessing Services has been announced deprecated in 10.8.
It would be more robust to use either Posix threads APIs, or FPC runtime synchronization objects (they're based on Posix threads anyway).

The fact that documentation for Multiprocessing Services still exists suggests that they still might work on Mojave, yet it would be safer (and backwards compatible) to use Posix
Actually, no. These are part of Carbon Core, so they might not work on Mojave at all.

Using Objective-C locking objects could be a long term solution as well.
« Last Edit: August 20, 2018, 09:35:41 pm by skalogryz »

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: How future "safe" is Carbon - anyone knows?
« Reply #70 on: August 21, 2018, 12:52:46 pm »
Thanks again!

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: How future "safe" is Carbon - anyone knows?
« Reply #71 on: August 24, 2018, 03:09:03 pm »
I use XCode (ProjectXC) to debug my app in High Sierra.

Is it possible to see warnings regarding deprecated macOS functions? Or probably it's possible directly in Lazarus?

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: How future "safe" is Carbon - anyone knows?
« Reply #72 on: August 24, 2018, 03:30:53 pm »
I use XCode (ProjectXC) to debug my app in High Sierra.
Is it possible to see warnings regarding deprecated macOS functions? Or probably it's possible directly in Lazarus?
only, if they are declared as deprecated in pascal headers.
and I'm quite sure they're not (carbon headers are not being updated)

Apple would be the best source of updated Pascal headers. However, the corporation doesn't provide them.

An alternative approach would be some sort of a tool that could parse C headers, extract deprecation information and then put it into pascal headers.
Such tool doesn't exists to my best knowledge

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: How future "safe" is Carbon - anyone knows?
« Reply #73 on: August 24, 2018, 04:55:49 pm »
Thanks, I've understood the situation.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: How future "safe" is Carbon - anyone knows?
« Reply #74 on: May 13, 2020, 08:56:14 am »
Hi,

I'm still trying to find all deprecated functions in our code.

Is there any news how automate this work?

Probably notarization tool can do it? Or not?

 

TinyPortal © 2005-2018