Jump to content

Vincent Parrett

Members
  • Content Count

    779
  • Joined

  • Last visited

  • Days Won

    57

Everything posted by Vincent Parrett

  1. Vincent Parrett

    Delphi Package Manager - choices?

    That's correct. When you install a package in a project, it first looks in the package cache (typically %APPDATA%\.dpm\packages - can be changed by the DPMPACKAGECACHE env variable) If the package is there then that is used, otherwise it (and any missing dependencies) is downloaded from the registered package sources into the package source. Then using some msbuild variables the package and it's dependencies are added to the project's search path This is an example from the dpm ide plugin for 10.4 <PropertyGroup> <DPMCompiler>10.4</DPMCompiler> <DPMCache Condition="'$(DPMCache)' == ''">$(APPDATA)\.dpm\packages</DPMCache> <DPM>$(DPMCache)\$(DPMCompiler)\$(Platform)</DPM> <DPMSearch Condition="'$(Platform)'=='Win32'">$(DPM)\VSoft.VirtualListView\0.3.0-rc8\lib;$(DPM)\VSoft.Uri\0.1.1\lib;$(DPM)\VSoft.SemanticVersion\0.2.2\lib;$(DPM)\VSoft.JsonDataObjects\0.1.1\lib;$(DPM)\VSoft.HttpClient\0.2.4\lib;$(DPM)\VSoft.CancellationToken\0.0.3\lib;$(DPM)\Gabr42.OmniThreadLibrary\3.7.8\lib;$(DPM)\VSoft.Awaitable\0.2.1\lib;$(DPM)\VSoft.AntPatterns\0.1.1\lib;$(DPM)\Spring4D.Extensions\2.0.0-dev7\lib;$(DPM)\Spring4D.Base\2.0.0-dev7\lib;$(DPM)\Spring4D.Core\2.0.0-dev7\lib;</DPMSearch> </PropertyGroup> Then the DPMSearch variable is added to the project search path <PropertyGroup Condition="'$(Base)'!=''"> <DCC_UnitSearchPath>$(DPMSearch);$(DCC_UnitSearchPath)</DCC_UnitSearchPath> </PropertyGroup> and lastly the package references are stored in the dproj so they can be restored (if missing) next time you open the project <ProjectExtensions> <DPM> <PackageReference id="Spring4D.Core" platform="Win32" version="2.0.0-dev7"> <PackageReference id="Spring4D.Base" platform="Win32" version="2.0.0-dev7" range="[2.0.0-dev7,]"/> </PackageReference> <PackageReference id="Spring4D.Extensions" platform="Win32" version="2.0.0-dev7"> <PackageReference id="Spring4D.Base" platform="Win32" version="2.0.0-dev7" range="[2.0.0-dev7,]"/> </PackageReference> <PackageReference id="VSoft.AntPatterns" platform="Win32" version="0.1.1"/> <PackageReference id="VSoft.Awaitable" platform="Win32" version="0.2.1"> <PackageReference id="Gabr42.OmniThreadLibrary" platform="Win32" version="3.7.8" range="[3.7.8,]"/> <PackageReference id="VSoft.CancellationToken" platform="Win32" version="0.0.3" range="[0.0.3,]"/> </PackageReference> <PackageReference id="VSoft.HttpClient" platform="Win32" version="0.2.4"> <PackageReference id="VSoft.CancellationToken" platform="Win32" version="0.0.3" range="[0.0.3,]"/> </PackageReference> <PackageReference id="VSoft.JsonDataObjects" platform="Win32" version="0.1.1"/> <PackageReference id="VSoft.SemanticVersion" platform="Win32" version="0.2.2"/> <PackageReference id="VSoft.Uri" platform="Win32" version="0.1.1"/> <PackageReference id="VSoft.VirtualListView" platform="Win32" version="0.3.0-rc8"/> </DPM> </ProjectExtensions> Of course I have simplified the description above, there's a lot more to it but that is the basics. I'm currently working on project group support (made some good progress today) and then design time component support.
  2. Vincent Parrett

    Farewell Rx10.4.2

    Look at it another way, why are so many issues created during the beta not resolved? How many of those are the same as those people are now reporting. There are always a lot of duplicates in Jira, perhaps because people don't bother to search first - but then searching for existing reports in jira is not easy.
  3. Vincent Parrett

    Delphi Package Manager - choices?

    The reality is that most people don't modify packages, they just use them. As for packages being global, well that's one of my pet peeves - because I work on different projects or versions of projects that use different versions of a package - can't do that is packages are global - at least not without a lot of hassle. That's something I working to resolve in my package manager. The cool thing about any package manager is that it's optional - you can choose to use it or not, or use it for some packages and reference others manually like before.
  4. Vincent Parrett

    Farewell Rx10.4.2

    Even if some are user error and some are duplicates, that's still a staggering number of issues in a week since the release.
  5. Vincent Parrett

    Delphi Package Manager - choices?

    Interesting, I hadn't seen this before (and I thought I had seen every delphi package manager!). Can't really make heads or tails of it though - not quite sure how it works. The docs are a little out of date - the project is still actively being worked on (source code here) - I'm currently working on project group support, resolving package conflicts between projects - anyone familiar with nuget would understand where I am heading This is what working with an individual project looks like 🤣 thought you were talking about package managers, not a promotional vehicle. I'm skipping D11 so no pain this time - but I am working hard to get DPM usable for everyone - that said, I have a day job that takes most of my time, so contributions and collaboration is welcomed 😉
  6. procedure UpdateTheme(Obj: TFrame); var objAsIThen : ITheme; begin If Supports(Obj, ITheme, objAsIThen) then objAsITheme.UpdateTheme; end;
  7. Vincent Parrett

    Generic Type Inference

    I'm open to suggestions - but really this is a Delphi compiler issue and I'm not sure what else I could do to work around it.
  8. Looking at my unrelsolved issues from 10.4.2 and earlier.. 12 might be optimistic 🙄
  9. And another 5 for it to actually work properly.
  10. Vincent Parrett

    We use DUnitX and it discovers all our silly mistakes before release

    If only this were actually possible.. but your customers would not be happy with your application's performance - codecoverage tools are literally debuggers that put a breakpoint on ever line of code and record when the breakpoint is hit - it slows things down dramatically. So only really practical to use it against unit tests. Our unit tests for FinalBuiilder only take a few seconds to execute, but when running with code coverage it takes about 20 minutes - I tend to turn it on only when making major changes or writing new tests.
  11. If you are using Delphi 7 with the default memory manager then you should look at an alternative memory manager like FastMM or NexusMM which do a much better job of reducing memory fragmentation.
  12. Vincent Parrett

    thread-safe ways to call REST APIs in parallel

    This sort of task looks like something that OmniThreadLibrary would handle - but does require some study to get right (worthwhile imho). I created a wrapper over it's async/await feature that might be useful https://github.com/VSoftTechnologies/VSoft.Awaitable (depends on https://github.com/VSoftTechnologies/VSoft.CancellationToken and omnithread) An extremly naive example (with no queueing or thread limiting) - will probably not compile as mostly hand typed/copypasta 😉 with some details omitted for brevity. var RequestsInFlight : integer = 0; CancelTokenSource : ICancellationTokenSource; procedure DoRequest(const cancelToken : ICancellationToken; const param1 : string) var LParam1 : string; begin LParam1 := param1; //local for capture Inc(RequestsInFlight); TAsync.Configure<string>( function (const cancelToken : ICancellationToken) : string var restclient : TWhateverclient; begin //run rest request here //check cancelToken.IsCancelled or use the cancelToken.Handle with waitformultipleobjects etc restclient := TWhateverclient.Create; try result := restclient.Execute(); finally restclient.free; end end, token); ) .OnException( procedure (const e : Exception) begin //log error end) .OnCancellation( procedure begin //clean up end) .Await( procedure (const value : string) begin Dec(RequestsInFlight); //use result - runs in the calling thread. end); end; procedure StartRequests(const cancelToken : ICancellationToken) begin //Start the requests. for i := 0 to RequestCount - do ExecuteRequest(cancelToken, RequestParams[i]); //monitor requests inflight to know when it's done. end; procedure StopRequests; begin CancelTokenSource.Cancel; end; The cancellation part requires that your rest client supports cancelling requests somehow. Hope that helps.
  13. Vincent Parrett

    Image32 - 2D graphics library (open source freeware)

    Yes, well that can be an issue on some projects - people ask for all sorts of things, when I don't have time I'll slap a `PR Invited` label on it and then... nothing - I guess the feature wasn't that important.
  14. Vincent Parrett

    Image32 - 2D graphics library (open source freeware)

    I see SF is using git now.. that's a plus - but that site hurts my eyes with a bunch of other irrelevant rubbish on each page - won't be signing up (can't remember if I ever did before)
  15. Vincent Parrett

    Image32 - 2D graphics library (open source freeware)

    Wow, this looks really good - and I have a use for it - in FinalBuilder we use a very old version of ImageEn to do image manipulation (resize, rotate, flip, mirror, convert file type etc) - unfortunately ImageEn is tied to the vcl so won't run in a docker container - I'm defintely going to try this. Pity it's not hosted on Github - would make forking, pull request etc so much easier 😉
  16. Vincent Parrett

    Run Time Sub Menu Gap

    Looks like this was solved on the adug forums 😃
  17. Vincent Parrett

    Test Insight not drawing correctly

    I have no idea what version or commit is available from GetIt (one of my many issues with it) as I'm not involved in getting it on there. The latest version can always be found on Github - https://github.com/VSoftTechnologies/DUnitX
  18. Vincent Parrett

    Test Insight not drawing correctly

    Make sure you are using the latest version of DUnitX and TestInsight.
  19. The same author has another json parser library - see here https://github.com/neslib/Neslib.Json/issues/5 - I have not used it yet but plan to very soon.
  20. It's this rich api that makes Spring4D collections worthwhile. The perf hit is still worth it for this alone. In a real world application (FinalBuilder) I have not noticed any perf issues that could be attributed to the spring4d collections, but then I'm rarely enumerating huge collections - certainly in my profiling efforts there were plenty of areas to optimise, but spring4d wasn't showing up as an area of concern in the profiler (vtune). Now if only we could have non ref counted interfaces (ie no calls to add/release) and we could implement interfaces on records - best of both worlds 😉
  21. Vincent Parrett

    OmniPascal: Auto-Implementation of methods not working

    I very much doubt embarcadero would have any interest in doing anything for freepascal - as for VSCode - they have their hands full just getting LSP to work properly for the delphi IDE (it's a work in progress right now).
  22. Vincent Parrett

    OmniPascal: Auto-Implementation of methods not working

    No idea if this is true or not, but last I heard (don't remember where I heard this) he was working for embarcadero on their LSP.
  23. A few months ago I replaced all RTL collections (apart from TStringList) with spring4d 2.0 collections and I saw noticeably smaller binaries (exe/bpl) and faster overall application performance. Spring4D collections are just so much nicer to use, being interface based is a plus for me, and the LINQ like functionality makes it really easy to do sorting, filtering, projections etc - if only Delphi had lambdas so the predicates etc were not so damned verbose! I'm extremely thankful for the work @Stefan Glienke has put into Spring4D 👍
  24. Vincent Parrett

    Child Table in BDE shows only Last 62 records of 262

    Can't say I've used woll2woll or the BDE in the last 20 years... but just a guess - is paging perhaps enabled somewhere, with a page size of 200? Perhaps it's just showing the last page?
  25. Vincent Parrett

    SSL certificate for VCL Application Exe

    https://www.ksoftware.net/code-signing-certificates/ OV certificates for $84 per year - EV for $349 per year. Either way, be prepared to jump through hoops to prove you are who you say you are. EV's are typically issued on a dongle and are a pain. You can automate them to a degree - but not when running from a windows service (ie on a ci server) https://www.finalbuilder.com/forums/t/signtool-with-ev-certificate-fails/6535/22
×