gitignore for projects

classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

gitignore for projects

4D Tech mailing list
It would be nice if when 4D exported a project, it created a .gitignore
file, but since it does not, which files/folders are we excluding?

--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
Mike,

Hi. It would probably not be appropriate for 4D to create a .gitignore as it can't assume that you will use Git as a repo. For Git you would want to exclude:
/Project/DerivedData

and possibly:
/Logs

On mac you would also want to exclude (this could be put in your global .gitignore file as it's applicable to all Git projects):
.DS_Store

There may be other exclusions that I have missed.

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
--

-----Original Message-----
From: 4D_Tech <[hidden email]> on behalf of 4D Tech Mailing List <[hidden email]>
Reply-To: 4D Tech Mailing List <[hidden email]>
Date: Friday, 3 January 2020 at 14:38
To: 4D Tech Mailing List <[hidden email]>
Cc: Mike Kerner <[hidden email]>
Subject: gitignore for projects

    It would be nice if when 4D exported a project, it created a .gitignore
    file, but since it does not, which files/folders are we excluding?
   
    --
    On the first day, God created the heavens and the Earth
    On the second day, God created the oceans.
    On the third day, God put the animals on hold for a few hours,
       and did a little diving.
    And God said, "This is good."
    **********************************************************************
    4D Internet Users Group (4D iNUG)
    Archive:  http://lists.4d.com/archives.html
    Options: https://lists.4d.com/mailman/options/4d_tech
    Unsub:  mailto:[hidden email]
    **********************************************************************


**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
and I see there is a discussion on the beta forum, so perhaps I should go
over there.
The reason for creating a .gitignore is because it won't do any harm if it
exists and you use another LCS.
In these days, it seems like git is the 400 kg gorilla, and subversion,
etc. are not very popular.

On Fri, Jan 3, 2020 at 9:51 AM Narinder Chandi via 4D_Tech <
[hidden email]> wrote:

> Mike,
>
> Hi. It would probably not be appropriate for 4D to create a .gitignore as
> it can't assume that you will use Git as a repo. For Git you would want to
> exclude:
> /Project/DerivedData
>
> and possibly:
> /Logs
>
> On mac you would also want to exclude (this could be put in your global
> .gitignore file as it's applicable to all Git projects):
> .DS_Store
>
> There may be other exclusions that I have missed.
>
> Regards,
> Narinder Chandi,
> ToolBox Systems Ltd.
> https://toolbox.systems
>
> I am available for new consulting opportunities…
> http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
> --
>
> -----Original Message-----
> From: 4D_Tech <[hidden email]> on behalf of 4D Tech Mailing
> List <[hidden email]>
> Reply-To: 4D Tech Mailing List <[hidden email]>
> Date: Friday, 3 January 2020 at 14:38
> To: 4D Tech Mailing List <[hidden email]>
> Cc: Mike Kerner <[hidden email]>
> Subject: gitignore for projects
>
>     It would be nice if when 4D exported a project, it created a .gitignore
>     file, but since it does not, which files/folders are we excluding?
>
>     --
>     On the first day, God created the heavens and the Earth
>     On the second day, God created the oceans.
>     On the third day, God put the animals on hold for a few hours,
>        and did a little diving.
>     And God said, "This is good."
>     **********************************************************************
>     4D Internet Users Group (4D iNUG)
>     Archive:  http://lists.4d.com/archives.html
>     Options: https://lists.4d.com/mailman/options/4d_tech
>     Unsub:  mailto:[hidden email]
>     **********************************************************************
>
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************



--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
In case you haven’t already seen it, there’s a great post on the 4D Blog on how to get started with 4D and GitHub. It’s a step-by-step listing covering the basics of getting a repository set up and working. Gitignore isn’t covered, but may be in an upcoming post. Here’s the link: https://blog.4d.com/how-to-share-your-4d-code-via-github/

Tom Benedict

> On Jan 3, 2020, at 07:22, Mike Kerner via 4D_Tech <[hidden email]> wrote:
>
> and I see there is a discussion on the beta forum, so perhaps I should go
> over there.
> The reason for creating a .gitignore is because it won't do any harm if it
> exists and you use another LCS.
> In these days, it seems like git is the 400 kg gorilla, and subversion,
> etc. are not very popular.
>
> On Fri, Jan 3, 2020 at 9:51 AM Narinder Chandi via 4D_Tech <
> [hidden email]> wrote:
>
>> Mike,
>>
>> Hi. It would probably not be appropriate for 4D to create a .gitignore as
>> it can't assume that you will use Git as a repo. For Git you would want to
>> exclude:
>> /Project/DerivedData
>>
>> and possibly:
>> /Logs
>>
>> On mac you would also want to exclude (this could be put in your global
>> .gitignore file as it's applicable to all Git projects):
>> .DS_Store
>>
>> There may be other exclusions that I have missed.
>>
>> Regards,
>> Narinder Chandi,
>> ToolBox Systems Ltd.
>> https://toolbox.systems
>>
>> I am available for new consulting opportunities…
>> http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
>> --
>>
>> -----Original Message-----
>> From: 4D_Tech <[hidden email]> on behalf of 4D Tech Mailing
>> List <[hidden email]>
>> Reply-To: 4D Tech Mailing List <[hidden email]>
>> Date: Friday, 3 January 2020 at 14:38
>> To: 4D Tech Mailing List <[hidden email]>
>> Cc: Mike Kerner <[hidden email]>
>> Subject: gitignore for projects
>>
>>    It would be nice if when 4D exported a project, it created a .gitignore
>>    file, but since it does not, which files/folders are we excluding?
>>
>
>

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Hi Mike,

This is what I’m trying:
------------------------------------------

# Ignore all at the root.
/*

# Except:
!.gitignore
!Resources
!Project

Project/DerivedData

Resources/Cache

# Ignore everywhere.
__MACOSX

> On Jan 3, 2020, at 9:38 AM, Mike Kerner via 4D_Tech <[hidden email]> wrote:
>
> which files/folders are we excluding?

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
Hey Tom,
I read the blog post and the first thing I thought was that trying to teach
everyone how to use the CLI was not the wisest way to go.  Getting your
brain wrapped around all of the things that happen in git (wait - why am I
force-pushing after a rebase?  How do I redact a repo?) is hard enough
without having to fight through the CLI.  It might be good to have a couple
of git primers, and maybe even a git gui roundup to make the transition
easier for people who are not familiar with git.
One of the things we did with the framework I use with another development
tool is automate some of the initial git configuration, including
connecting hooks into one of the more popular text editors, the submoduling
of the remote repo for the framework, generating the local repo, the
.gitignore file, etc.  I'd like to think it has helped people adopt the
framework.  It certainly has helped me set up projects 2..n without having
to have a template that I had to copy and a bunch of steps to perform every
time to get it running.
Mainly I'm glad 4D is going this route (even though I'm not a JSON fan).
Git has become an invaluable tool for us and our ability to manage all the
source code we have across all of the projects we maintain.


On Fri, Jan 3, 2020 at 2:17 PM Jeremy French via 4D_Tech <
[hidden email]> wrote:

> Hi Mike,
>
> This is what I’m trying:
> ------------------------------------------
>
> # Ignore all at the root.
> /*
>
> # Except:
> !.gitignore
> !Resources
> !Project
>
> Project/DerivedData
>
> Resources/Cache
>
> # Ignore everywhere.
> __MACOSX
>
> > On Jan 3, 2020, at 9:38 AM, Mike Kerner via 4D_Tech <
> [hidden email]> wrote:
> >
> > which files/folders are we excluding?
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************



--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
Jeremy,
Are you ignoring root so you catch .4DB, .RSR, .4DL, etc.?

On Fri, Jan 3, 2020 at 3:46 PM Mike Kerner <[hidden email]>
wrote:

> Hey Tom,
> I read the blog post and the first thing I thought was that trying to
> teach everyone how to use the CLI was not the wisest way to go.  Getting
> your brain wrapped around all of the things that happen in git (wait - why
> am I force-pushing after a rebase?  How do I redact a repo?) is hard enough
> without having to fight through the CLI.  It might be good to have a couple
> of git primers, and maybe even a git gui roundup to make the transition
> easier for people who are not familiar with git.
> One of the things we did with the framework I use with another development
> tool is automate some of the initial git configuration, including
> connecting hooks into one of the more popular text editors, the submoduling
> of the remote repo for the framework, generating the local repo, the
> .gitignore file, etc.  I'd like to think it has helped people adopt the
> framework.  It certainly has helped me set up projects 2..n without having
> to have a template that I had to copy and a bunch of steps to perform every
> time to get it running.
> Mainly I'm glad 4D is going this route (even though I'm not a JSON fan).
> Git has become an invaluable tool for us and our ability to manage all the
> source code we have across all of the projects we maintain.
>
>
> On Fri, Jan 3, 2020 at 2:17 PM Jeremy French via 4D_Tech <
> [hidden email]> wrote:
>
>> Hi Mike,
>>
>> This is what I’m trying:
>> ------------------------------------------
>>
>> # Ignore all at the root.
>> /*
>>
>> # Except:
>> !.gitignore
>> !Resources
>> !Project
>>
>> Project/DerivedData
>>
>> Resources/Cache
>>
>> # Ignore everywhere.
>> __MACOSX
>>
>> > On Jan 3, 2020, at 9:38 AM, Mike Kerner via 4D_Tech <
>> [hidden email]> wrote:
>> >
>> > which files/folders are we excluding?
>>
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:[hidden email]
>> **********************************************************************
>
>
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>    and did a little diving.
> And God said, "This is good."
>


--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
Hi Mike,

No. What you call “root” is the folder whose top level contains both the 4D Project Database and its GIT local repository.

See “Architecture of a 4D Project” at https://developer.4d.com/docs/en/Project/architecture.html <https://developer.4d.com/docs/en/Project/architecture.html>

In the example (shown at the above ULR), I would create a GIT local repository in the “MyFirstProject” folder at the top level. Note there are a lot of folders, but only a few make sense to track: Project and Resources.

I’m approaching “ignoring” files by saying ignore everything, and then specifying what to actually track. That seems like less typing and easier to read.

So first part says exclude everything. That’s the this line:

/*

Then I say track these items. Note the exclamation point which means put back.

!.gitignore
!Resources
!Project

But within the Resources and Project folders do ignore the following 2-items. Note the absence of the exclamation point:

Project/DerivedData
Resources/Cache


— Jeremy French

> On Jan 3, 2020, at 3:47 PM, Mike Kerner via 4D_Tech <[hidden email]> wrote:
>
> Jeremy,
> Are you ignoring root so you catch .4DB, .RSR, .4DL, etc.?

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
This is a great discussion of best practices and guidelines for 4D Projects and I hope others chime in. It’s a new world for many of us. I would like to start using Project Mode, but our apps have hundreds (maybe thousands) of highlight buttons, which are incompatible. If anyone has built an automated or even semi-automated way to convert highlight buttons to 3D buttons, I’d love to hear about it.

Tom Benedict

> On Jan 3, 2020, at 14:40, Jeremy French via 4D_Tech <[hidden email]> wrote:
>
> Hi Mike,
>
> No. What you call “root” is the folder whose top level contains both the 4D Project Database and its GIT local repository.
>
> See “Architecture of a 4D Project” at https://developer.4d.com/docs/en/Project/architecture.html <https://developer.4d.com/docs/en/Project/architecture.html>
>
> In the example (shown at the above ULR), I would create a GIT local repository in the “MyFirstProject” folder at the top level. Note there are a lot of folders, but only a few make sense to track: Project and Resources.
>
> I’m approaching “ignoring” files by saying ignore everything, and then specifying what to actually track. That seems like less typing and easier to read.
>
> So first part says exclude everything. That’s the this line:
>
> /*
>
> Then I say track these items. Note the exclamation point which means put back.
>
> !.gitignore
> !Resources
> !Project
>
> But within the Resources and Project folders do ignore the following 2-items. Note the absence of the exclamation point:
>
> Project/DerivedData
> Resources/Cache
>
>
> — Jeremy French
>
>> On Jan 3, 2020, at 3:47 PM, Mike Kerner via 4D_Tech <[hidden email]> wrote:
>>
>> Jeremy,
>> Are you ignoring root so you catch .4DB, .RSR, .4DL, etc.?
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
You can keep your project in binary mode (even keep it in version 17) and still take advantage of version 18, project mode, and git. Here is what I'm doing.

 "Master" branch is version 17. When I want to commit a new version I have a 4D method that copies the structure, opens it in 4D 18, and then exports the structure in project mode format. This can be completely automated and only takes a few seconds.

Now that you have a master branch, you can create a version 18 branch for implementing next version features that take advantage of new 4D 18 capabilities. Just open your source directly in version 18 project mode. You can test the conversion and have both 17 and 18 versions open at the same time as long as you have separate data files.

You can continue to make version 17 changes, export, and then merge into your 18 branch. At some point in the future, all your conversion issues will be resolved and you can promote the 18 branch as master and deploy with 4D 18.

John DeSoi, Ph.D.


 
> On Jan 3, 2020, at 5:17 PM, Tom Benedict via 4D_Tech <[hidden email]> wrote:
>
> This is a great discussion of best practices and guidelines for 4D Projects and I hope others chime in. It’s a new world for many of us. I would like to start using Project Mode, but our apps have hundreds (maybe thousands) of highlight buttons, which are incompatible. If anyone has built an automated or even semi-automated way to convert highlight buttons to 3D buttons, I’d love to hear about it.

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
Hi John,

> You can keep your project in binary mode (even keep it in version 17) and still take advantage of version 18, project mode, and git.

Interesting idea.


> "Master" branch is version 17.

Did you create the v17 Master Branch by:

1) Open a copy of the v17 structure and then open the copy in v18 to convert v17 to v18; and
2) Commit the conversion to v18 as the v17 Master branch; and
3) Create a new branch (off Master) as v18.

The above was done only once.


> When I want to commit a new version I have a 4D method that copies the structure, opens it in 4D 18, and then exports the structure in project mode format.

Are you doing this workflow to continue development in v17?

1) Continue to develop in v17; and
2) Make a copy of the v17 structure and then open the copy in v18 to convert v17 to v18; and
3) Commit the v18 to the v18 branch.


Best regards,
Jeremy French


Full post from John DeSoi follows:


> When I want to commit a new version I have a 4D method that copies the structure, opens it in 4D 18, and then exports the structure in project mode format

> On Jan 4, 2020, at 12:33 PM, John DeSoi via 4D_Tech <[hidden email]> wrote:
>
> You can keep your project in binary mode (even keep it in version 17) and still take advantage of version 18, project mode, and git. Here is what I'm doing.
>
> "Master" branch is version 17. When I want to commit a new version I have a 4D method that copies the structure, opens it in 4D 18, and then exports the structure in project mode format. This can be completely automated and only takes a few seconds.
>
> Now that you have a master branch, you can create a version 18 branch for implementing next version features that take advantage of new 4D 18 capabilities. Just open your source directly in version 18 project mode. You can test the conversion and have both 17 and 18 versions open at the same time as long as you have separate data files.
>
> You can continue to make version 17 changes, export, and then merge into your 18 branch. At some point in the future, all your conversion issues will be resolved and you can promote the 18 branch as master and deploy with 4D 18.
>
> John DeSoi, Ph.D.

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
Hi Jeremy,


> On Jan 4, 2020, at 1:53 PM, Jeremy French <[hidden email]> wrote:
>
> Did you create the v17 Master Branch by:
>
> 1) Open a copy of the v17 structure and then open the copy in v18 to convert v17 to v18; and
> 2) Commit the conversion to v18 as the v17 Master branch; and
> 3) Create a new branch (off Master) as v18.
>
> The above was done only once.

Conceptually, that is the best way to think about it. After the first conversion you have a "master" branch which is the 4D 17 version converted to 18. Initially, the "18" branch is exactly the same.

Then I can switch to the 18 branch and work on new features that use new commands and functions added in 4D 18.

>>
>> When I want to commit a new version I have a 4D method that copies the structure, opens it in 4D 18, and then exports the structure in project mode format.
>
> Are you doing this workflow to continue development in v17?

Yes. Switch back to the 17 "master" branch. Verify there are no uncommitted changes in the Project folder (git status called from 4D). Move the Project folder to the trash. Run the 17 to 18 script again and generate a new Project folder with the current source. Commit as the new "master" branch. Merge (or fast forward) the master branch into the 18 branch to keep it up to date with the changes in 4D 17.

In this model, I'm only making structure and form changes in the 17 master branch. Methods can be changed in both branches.


John DeSoi, Ph.D.


**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
In reply to this post by 4D Tech mailing list
John DeSoi, Ph.D.

Thanks for offering your workflow, John. This is very interesting.

> "Master" branch is version 17. When I want to commit a new version I have a 4D method that copies the structure, opens it in 4D 18, and then exports the structure in project mode format. This can be completely automated and only takes a few seconds.

How large is your structure? I ask, because our structure has around a million lines of code and probably 15,000 forms and when I’ve tried exporting under 17r5 it takes many minutes. Also, my attempt at setting up a git repository ran into similar performance issues, only hours instead of minutes. I lost interest at that point.

> You can continue to make version 17 changes, export, and then merge into your 18 branch. At some point in the future, all your conversion issues will be resolved and you can promote the 18 branch as master and deploy with 4D 18.

This sounds almost like magic. When you “merge” how do you know what code takes priority? Do you have to examine each method and form?

BTW, did you have prior experience with git? I’m asking because my past attempts to get a conceptual understanding of git and version control have had limited success. I found the concepts and terminology overwhelming and couldn't map the git workflow to my 4D workflow at all. I’m looking forward to more posts like yours which provides ‘just enough’ git to get started.

Tom Benedict
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
In reply to this post by 4D Tech mailing list
On Jan 4, 2020, at 6:42 PM, John DeSoi via 4D_Tech <[hidden email]> wrote:
>
> Yes. Switch back to the 17 "master" branch. Verify there are no uncommitted changes in the Project folder (git status called from 4D). Move the Project folder to the trash. Run the 17 to 18 script again and generate a new Project folder with the current source. Commit as the new "master" branch. Merge (or fast forward) the master branch into the 18 branch to keep it up to date with the changes in 4D 17.

This is an interesting workflow, I’ll probably copy this to start prepping for v18.

> In this model, I'm only making structure and form changes in the 17 master branch. Methods can be changed in both branches.

Are there any problems with functionalities can’t be used in v18 project mode that don’t have replacements in v17.3 (not R-series)? I’ve seen mentions of users/groups changes in particular but I haven’t investigated the details yet.

Jim Crate

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Hi Tom,

> On Jan 4, 2020, at 10:13 PM, Tom Benedict <[hidden email]> wrote:
>
> How large is your structure? I ask, because our structure has around a million lines of code and probably 15,000 forms and when I’ve tried exporting under 17r5 it takes many minutes.

Roughly 150,000 lines of source code and probably about 300 or so forms.

A lot has happened between 17r5 and 18, so it might be worth trying again. Also, the Export structure command gives you a lot of control over how exporting is done. It would be worth it for you to test various aspects independently and see what the bottleneck is and report back to 4D.

At the end of this message I have included the export script I'm using. When the temporary 17 copy is converted to 18, this method is executed with PROCESS 4D TAGS to export the structure for the master branch version control.


> Also, my attempt at setting up a git repository ran into similar performance issues, only hours instead of minutes. I lost interest at that point.

Is this with git directly from the command line or using a GUI tool? I have seen many performance and other issues using a GUI tool that go away when I execute the same operations from the command line.


>
>> You can continue to make version 17 changes, export, and then merge into your 18 branch. At some point in the future, all your conversion issues will be resolved and you can promote the 18 branch as master and deploy with 4D 18.
>
> This sounds almost like magic. When you “merge” how do you know what code takes priority? Do you have to examine each method and form?

Merging is why you use git for this task. It automatically identifies any conflicting changes between the branches and allows you to decide what to keep. I'm doing maintenance/bug fixes in 17 and new features in version 18. There are rarely any merge conflicts. If you modify the same methods in both branches, you'll spend a lot more time dealing with merge conflicts.


> BTW, did you have prior experience with git? I’m asking because my past attempts to get a conceptual understanding of git and version control have had limited success. I found the concepts and terminology overwhelming and couldn't map the git workflow to my 4D workflow at all. I’m looking forward to more posts like yours which provides ‘just enough’ git to get started.


I have been using git with 4D since 2014 and with other environments for much longer. With 4D it has been mostly for version management and change tracking. 4D 18 changes things and makes development like the rest of the world; you can manage multiple branches and integrate work from multiple (remote) developers.

John DeSoi, Ph.D.




<!--#4DCODE

  //Exports the current structure in the current folder for version control and project mode testing.

  //$1 - (optional) Log results to the event log for standard output.


C_BOOLEAN($1;$eventLog)

C_OBJECT($oOption;$oResult)
C_TEXT($path;$projectFolder;$out)

If (Count parameters>=1)
        $eventLog:=$1
End if


$path:=Get 4D folder(Database folder)
$projectFolder:=$path+"Project"

$oOption:=New object
$oOption.makeProject:=True

  //Have to specify all if any are false.
$oOption.filter:=New object(\
"buildSettings";True;\
"catalog";True;\
"databaseMethods";True;\
"dataPath";False;\
"directory";True;\
"filters";True;\
"folders";True;\
"forms";True;\
"lists";True;\
"menus";True;\
"methodPreferences";True;\
"pageFormat";True;\
"pictures";False;\
"projectMethods";True;\
"resources";False;\
"settings";True;\
"styleSheets";True;\
"tips";True;\
"trash";False;\
"triggerMethods";True;\
"windowPositions";True)


If (Test path name($projectFolder)>=0)
        ALERT("Project path exists - "+$projectFolder)
Else
        $oResult:=Export structure file($path;$oOption)
        $out:=JSON Stringify($oResult;*)
        If ($eventLog)
                LOG EVENT(Into system standard outputs;$out;Information message)
        Else
                ALERT($out)
        End if
End if

-->
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Hi Jim,

> On Jan 5, 2020, at 7:31 AM, Jim Crate via 4D_Tech <[hidden email]> wrote:
>
>> In this model, I'm only making structure and form changes in the 17 master branch. Methods can be changed in both branches.
>
> Are there any problems with functionalities can’t be used in v18 project mode that don’t have replacements in v17.3 (not R-series)? I’ve seen mentions of users/groups changes in particular but I haven’t investigated the details yet.

Yes, there are a number of differences not only between 17.3 and 18 project mode, but between 18.4db and 18 project mode. For example, the picture library does not exist in project mode. Method comments are gone in project mode. I minimally use users/groups, but that is different also.

One problem I reported is the 4D structure catalog exported from the v18.4db is modified just by opening it in 18 project mode. Seems to have something to do with tips or comments associated with fields. For now I have to remember to discard catalog.4DCatalog changes before I commit branch 18 changes.

John DeSoi, Ph.D.


**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
In reply to this post by 4D Tech mailing list
On Jan 5, 2020, at 18:45, John DeSoi via 4D_Tech <[hidden email]> wrote:
>
> Hi Tom,
>
>> Also, my attempt at setting up a git repository ran into similar performance issues, only hours instead of minutes. I lost interest at that point.
>
> Is this with git directly from the command line or using a GUI tool? I have seen many performance and other issues using a GUI tool that go away when I execute the same operations from the command line.
>
Indeed, I’ve only used GitHub Desktop. I need to give the command line a try. The steps outlined in the 4D Blog posting will be a good place for me to start.

Thanks,

Tom Benedict
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Hi John,

What type of issues have you found using a GIT GUI tool?

- Jeremy French


> On Jan 5, 2020, at 9:45 PM, John DeSoi via 4D_Tech <[hidden email]> wrote:
>
> Is this with git directly from the command line or using a GUI tool? I have seen many performance and other issues using a GUI tool that go away when I execute the same operations from the command line.

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
Hi Jeremy,

One I used to use (GitX, I think) would sometimes take forever or spin the beach ball of death for large commits. I'm now using Fork (which I really like). Sometimes I get various commit or other operation errors. No problems from the command line.

Here is another issue to watch out for with 4D/Git. In 4D you can globally rename a method changing only the case and not the spelling. Even if 4D changes the method name on disk, git remembers the case of first commit. It is not seen as a change because by default on Mac and Windows file names are not case sensitive. So if you switch branches, git checks out the file name using whatever case you used initially. This cases 4D to tokenize the name incorrectly in method callers.

To solve this, you need to use git mv to tell git to use to updated name case when you rename methods without changing the spelling.

John DeSoi, Ph.D.


> On Jan 6, 2020, at 7:28 AM, Jeremy French <[hidden email]> wrote:
>
> What type of issues have you found using a GIT GUI tool?

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: gitignore for projects

4D Tech mailing list
oh gawd, so much has happened on this thread in a couple of days...
@Tom - I get an error for 3d buttons, too "3D button style is not
supported."  I was thinking of writing a quick tool to fix all the button
types, since parsing and editing the JSON should be straightforward, but
what I might do instead is farm this out to the people who are patiently
waiting for the RFQ on this project
@John - method comments are gone - does that mean that they aren't even
exported when the project is created?

All of the Git GUI tools have their thing, and there are definitely times
when the CLI is the way to go, but that is becoming less and less
frequent.  I would say we're probably doing 95% or so of our git work in
GitKraken, and 5% in the CLI.  GK has been developing really rapidly,
including their Glo functionality, which gives you Kanban-style card boards
for tracking issues and priorities in your project, and it sync's with
Github's Issues if you want to do that.  We've been using GitKraken for a
couple of years (although on the ipads, for instance, we use Working Copy
b/c it's the only real git tool available on an ipad).  I personally don't
like Github desktop.

Did I mention that I'm really happy that 4D has chosen to go this direction?

On Mon, Jan 6, 2020 at 8:55 AM John DeSoi via 4D_Tech <[hidden email]>
wrote:

> Hi Jeremy,
>
> One I used to use (GitX, I think) would sometimes take forever or spin the
> beach ball of death for large commits. I'm now using Fork (which I really
> like). Sometimes I get various commit or other operation errors. No
> problems from the command line.
>
> Here is another issue to watch out for with 4D/Git. In 4D you can globally
> rename a method changing only the case and not the spelling. Even if 4D
> changes the method name on disk, git remembers the case of first commit. It
> is not seen as a change because by default on Mac and Windows file names
> are not case sensitive. So if you switch branches, git checks out the file
> name using whatever case you used initially. This cases 4D to tokenize the
> name incorrectly in method callers.
>
> To solve this, you need to use git mv to tell git to use to updated name
> case when you rename methods without changing the spelling.
>
> John DeSoi, Ph.D.
>
>
> > On Jan 6, 2020, at 7:28 AM, Jeremy French <[hidden email]> wrote:
> >
> > What type of issues have you found using a GIT GUI tool?
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************



--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
12