December 29, 2020
On Tuesday, 29 December 2020 at 19:26:20 UTC, Per Nordlöw wrote:
> Can you elaborate on which case I've missed?

Unless, CTFE incorporate non-deterministic states, but afaict it isn't allowed to do that since, the functions it calls must all be pure.
December 29, 2020
On Tuesday, 29 December 2020 at 19:26:20 UTC, Per Nordlöw wrote:
> If we, in dmd, during the initial (uncached) build log all the imported files including string imports and output them to a cache description together with their individual content hashes and pessimistically rebuild every time anything changes I don't see how this can be an issue. Can you elaborate on which case I've missed?

Thanks, John Colvin for your thorough answer.
Both I and others will greatly benefit from me making my language as formal as yours. ;)
December 29, 2020
On Tuesday, 29 December 2020 at 16:43:33 UTC, John Colvin wrote:
> Or something like that, you get the idea... It's not intractable, it's just a bit fiddly.

Superb answer.

Does this design match https://github.com/dlang/dub/pull/2044
December 29, 2020
On Tuesday, 29 December 2020 at 19:57:21 UTC, Per Nordlöw wrote:
> On Tuesday, 29 December 2020 at 16:43:33 UTC, John Colvin wrote:
>> Or something like that, you get the idea... It's not intractable, it's just a bit fiddly.
>
> Superb answer.
>
> Does this design match https://github.com/dlang/dub/pull/2044

Not really, although maybe it should?

If I understand correctly (I haven't reviewed the implementation), that PR is using dub's normal rebuild rules w.r.t. changed files and is just swapping out access times for content hashes. Maybe I'm mistaken, but I don't think dub pays any attention to changes in files that aren't source files.
December 29, 2020
On Tuesday, 29 December 2020 at 20:09:25 UTC, John Colvin wrote:
> On Tuesday, 29 December 2020 at 19:57:21 UTC, Per Nordlöw wrote:
>> On Tuesday, 29 December 2020 at 16:43:33 UTC, John Colvin wrote:
>>> Or something like that, you get the idea... It's not intractable, it's just a bit fiddly.
>>
>> Superb answer.
>>
>> Does this design match https://github.com/dlang/dub/pull/2044
>
> Not really, although maybe it should?
>
> If I understand correctly (I haven't reviewed the implementation), that PR is using dub's normal rebuild rules w.r.t. changed files and is just swapping out access times for content hashes. Maybe I'm mistaken, but I don't think dub pays any attention to changes in files that aren't source files.

s/access times/modification times/
s/source files/in sourceFiles\/sourcePaths/
December 30, 2020
On 12/29/20 11:09 PM, John Colvin wrote:
> On Tuesday, 29 December 2020 at 19:57:21 UTC, Per Nordlöw wrote:
>> On Tuesday, 29 December 2020 at 16:43:33 UTC, John Colvin wrote:
>>> Or something like that, you get the idea... It's not intractable, it's just a bit fiddly.
>>
>> Superb answer.
>>
>> Does this design match https://github.com/dlang/dub/pull/2044
> 
> Not really, although maybe it should?
> 
> If I understand correctly (I haven't reviewed the implementation), that PR is using dub's normal rebuild rules w.r.t. changed files and is just swapping out access times for content hashes.  


Dub already provides something like S, say S* [1], so currently compiler invocation is F(Z)->0, where Z = (X, S*). The PR implements this:

rebuild = false
foreach(file: Z)
{
	if Hash(file) != BuildCache[file] or !file.exists
	{
		rebuild = true
		break
	}
}

if (rebuild)
{
	buildWithCompiler
	BuildCache = Hash(Z)
}



> Maybe I'm mistaken, but I
> don't think dub pays any attention to changes in files that aren't source files.
Probably I misunderstand but if you mean that source files are *.d files only then you are mistaken, Z contains *.{sdl|json}, string imports, binary libraries etc

1 Not exactly S, dub scans all string import paths and adds their content to S, so it can add files that are not used in the current build
December 30, 2020
On Tuesday, 29 December 2020 at 17:43:49 UTC, Petar Kirov [ZombineDev] wrote:
>> [1]: coming soon: https://github.com/dlang/dmd/pull/12049

Great addition.

Will the new dub caching pull request benefit from using -makedeps?
1 2
Next ›   Last »