Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The herd instinct among economists makes sheep look like independent thinkers.


devel / comp.lang.python / Synchrozining and versioning "linked files"/"dependencies" language neutral/independent

SubjectAuthor
o Synchrozining and versioning "linked files"/"dependencies" language neutral/indeskybuck2000

1
Synchrozining and versioning "linked files"/"dependencies" language neutral/independent

<0d5dd89b-d3d3-4821-9a16-04abd5ecee6bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=16231&group=comp.lang.python#16231

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:a05:620a:199a:: with SMTP id bm26mr18451094qkb.542.1637977343753;
Fri, 26 Nov 2021 17:42:23 -0800 (PST)
X-Received: by 2002:a05:620a:74d:: with SMTP id i13mr26270078qki.148.1637977343621;
Fri, 26 Nov 2021 17:42:23 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Fri, 26 Nov 2021 17:42:23 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=84.25.28.171; posting-account=np6u_wkAAADxbE7UBGUIOm-csir6aX02
NNTP-Posting-Host: 84.25.28.171
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0d5dd89b-d3d3-4821-9a16-04abd5ecee6bn@googlegroups.com>
Subject: Synchrozining and versioning "linked files"/"dependencies" language neutral/independent
From: skybuck2...@hotmail.com (skybuck2000)
Injection-Date: Sat, 27 Nov 2021 01:42:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 128
 by: skybuck2000 - Sat, 27 Nov 2021 01:42 UTC

Idea how to make GIT link aware written on 27 november 2021 by Skybuck Flying/Harald Houppermans and posted on "Git for human beings" newsgroup:

Programming languages like C, Delphi, Python, Java, C#, C++ and others often have include and import and use clausules and such in their program files..

For example:
include "filea.h";
uses fileb;
import graphics;

These pieces of synthax describe how the files are linked together and how they dependent on each other.

Each compiler writer/language designer could write a small little tool/parser that GIT.exe could use to discover links/dependencies between files.

Even graphics and other file types could make use of this feature/idea.

This allows GIT to become aware of what could be considered a "dependency" map.

Such a dependency map, or "view of dependency" would allow certain desired features.

One very important one is including version numbers/information in files, which is currently completely lacking.

Problem example:
file.a includes/uses/imports/depends on file.b

There are now three scenerios:

scenerio 1: file.a is changed/updated
scenerio 2: file.b is changed/updated
scenerio 3: both are changed/updated

question/problem:
which version of file.a used which version of file.b ?

There are two ways to tackle this problem:

1. Either development environments are made aware of git and different
versions.

2. Or the version information gets exported from git and stored into the files
themselfes, either in the file system as a special field, or appended to the filename.

Examples of solution 2 are:

file.a.version.001
file.b.version.001
file.a.version.002
file.b.version.002

Now for a more complex example to illustrate better the requirements:

file.a uses file.b, file.c, file.d, file.e.

if any of the file.b to file.e is updated/versioned then so should file.a, even though file.a did not change the final behaviour of file.a may have changed through different behaviours in file.b to file.e which are used by file.a, therefore it is highly desireable that file.a also gets versioned/up a version+1 in case any of it's dependencies is also versioned/changed/up a version+1

Furthermore by constructing a "dependency map" it can be seen that A also depends on other files, therefore it may be desireable to update all of their versions as well, and sync them, especially if they are in the same folder, this can be a strong indicator that these files belong together and should have the same version number to describe them as a form of a package, library, module and such though more implicit perhaps.

This could be set as a rule, "versioning/sync-up" files in the same folder.

When a commit is done, all files on the dependency map get a new incremented synchronized version number, at least the files in the same folder.

Different options could be used to also allow individual versioning.

The second tool that would be necessary from compiler writers is a "change include/uses/import" tool or functionality.

Where the compiler/parser parses the files on the dependency map, then scans the files for the dependency links and replaces the existing links with the new filenames with their new version numbers.

Such that builds don't break and all files uses all other files properly such that they use the correct updated/incremented versioning number.

Such a tool could be called "Link.exe" or "LinkUp" or "LinkDependency.exe"

This would allow GIT two things:

1. Query files for links to other files.
2. Update links inside files to other files.

Basically this would allow GIT to do proper versioning numbering by for example appending version numbers to file names. To keep version numbers in sync across
related files in folders, to replace version numbers inside include/users/import statements.

This feature would be/could be more fine-grained then submodules, I have not yet used submodules, and could be weird to use submodules per file in some folder.

Plus for development environments it becomes more clear which version is actually used/opened.

Mixing of versions also becomes possible to some degree.

For example
file.a.002 could use file.b.001 and file.b.002

to transition between functionality or compare, or provide backwards compatibility and so forth.

also mixed-versions of file allows code to be upgraded more gradually instead of all or nothing.

For example some files could still use apiv1 while updated files could use apiv2 or libraryv2.

Bye for now,
Skybuck.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor