langelescu
langelescu
CC#
Created by langelescu on 7/14/2023 in #help
❔ Hosting CoreWCF service in AspNet Core (Kestrel). How do I validate the service is up?
The output contains notifications that 1) the Kestrel server is listening on the port I specified and that 2) there is an HTTP endpoint at the path I specified, e.g. '/Service' for the sake of the conversation. However I am unclear if the service object has been initialized without error. I am having trouble establishing an API call, with the connection abruptly disconnecting and a CommunicationException being reported on the client-side. I also set up a /metadata endpoint and I am able to see the service metadata & add the service as a reference and generate a client in WCF. Output: info: Microsoft.Hosting.Lifetime[14] Now listening on: http://127.0.0.1:8601 info: CoreWCF.Channels.ServiceModelHttpMiddleware[0] Mapping CoreWCF branch app for path /Service I want to understand to troubleshoot this thing.
2 replies
CC#
Created by langelescu on 6/6/2023 in #help
❔ Help me make sense of the file status I see during git merge
I am merging branch refactored into branch develop. The former, as the name implies, is a branch that refactors the folders, files, and namespaces of the project. With develop checked out, I run git merge refactored. Some conflicts are reported as expected. Amongst them, consider file Core.cs that in develop existed at path Shared/src/Core/Core.cs. In refactored this file has been moved into location Common/Core/Core.cs. However, git does not detect the move. Instead it reports the following. Running git status | select-string "/Core.cs" -SimpleMatch I get all lines in the git status output that contain the file name. Interestingly I see:
1. deleted: /Shared/src/Core/Core.cs 2. both modified: /Common/Core/Core.cs
I expected to see 1. But 2. is odd. I would expect to see something like new file added because /Common/Core/Core.cs only exists Further. git ls-files -s /Common/Core/Core.cs shows this file in all merge stages, which is bizzare because this path did not exist at all in develop:
100644 be51adb6d3...b421a 1 Common/Core/Core.cs 100644 0736c00294...252e7 2 Common/Core/Core.cs 100644 1be6053172...3ca54 3 Common/Core/Core.cs
Can someone help me decipher this information?
2 replies
CC#
Created by langelescu on 5/31/2023 in #help
How to do a 3 way merge on a file that has been moved after folder structure and refactoring change?
The repo I am working in has been radically refactored. The folder structure has changed and a long with it the subset of files in each folder. Furthermore, namespaces and classes have been renamed, moved, or changed. I am looking at merging the branch that contains this updated version of our source code, e.g. Project/updated back into the original Project/develop and bringing this develop branch up-to-date. Naturally, because life is not easy, several changes due to service packs were added to the original Project/develop branch since the creation of Project/updated so the merge contains files that were not only moved from one location to another but also changed in both branches. So the changes need to be carried forward and integrated into Project/develop. Once the merge has run its first pass, the output shows for a given such file that: 1. File was deleted from the old location [Conflict] 2. File was added to a new location [Staged change] So I need a 3way merge to reconcile these versions and for that I need to see the base version of the file at the point of branching, the current version in Project/develop and the incoming version in Project/updated, I know the base commit but I am not sure how to get access to the base file. I am using `p4merge <base file path> <incoming file.cs> <current file.cs> <final merged file.cs>. How do I get a file for <base file path> given that I know the commit where the base version of the file exists?
2 replies
CC#
Created by langelescu on 5/2/2023 in #help
❔ How to deal with paths and file system files in a Win/Linux cross platform NET 6 application?
I am working with a cross-platform application (Linux & Windows) that requires a plethora of configuration files and performs a lot of file IO during execution in locations typically under the installation folder. I would like to know, at a high level, how the configuration files, the paths utilized in the code (some hardcoded & some dynamically created), and permissions are best to be maintained in the product code. This is an application that just now is implementing Linux support. A pain point is that the installation & configuration locations in Windows are different than those on Linux. My thinking is that I would like to have these paths configured somewhere as strings, but load the correct set based on the platform at runtime. However, I do not know whether these is a configuration that facilitates this setup in .NET or whether this is an effective approach. I am looking for high level recommendations and suggestions on how to deal with file system artifacts as current pain points include: 1. Errors while creating/reading files due to permissions not being set correctly on the files or folders created at runtime 2. Bogus file system folders and files being created when a file path contains spaces and subsequent errors while opening them 3. Subprocesses not starting correctly due to location resolution errors
17 replies
CC#
Created by langelescu on 4/27/2023 in #help
✅ How to "rename" Git remote branch?
On <remote> I have a Product/develop branch which I want renamed to Product/x_develop. Then I want to take the Product/y_develop, also on <remote> and rename to Product/develop. Both branches will continue to be in used. Product/develop will host the future development while 'Product/x_develop' will only be used for service packs. x/develop has service pack branches x.y, x.z, etc. What's the best way to go about this without breaking anything?
15 replies