aya-dev icon indicating copy to clipboard operation
aya-dev copied to clipboard

Library Redefinition

Open HoshinoTented opened this issue 2 years ago • 9 comments

Assume that:

  • A library A, which defines prim I
  • A library B, which depends on library A and defines nothing.
  • A library C, which depends on library A and library B, also defines nothing.
Aya said:
Compiling A
  [Info] Resolving source file dependency
    Done in 158ms
  [Tyck] Prim (Prim.aya)
I like these modules :)
    Library loaded in 412ms
Compiling A
  [Info] Resolving source file dependency
    Done in 1ms
  [Tyck] Prim (Prim.aya)
In file Prim.aya:1:5 ->

  1 | prim I
           ^^

Error: Redefinition of primitive `I'

Resolving interrupted due to:
1 error(s), 0 warning(s).
🔨

See here for the complete information.

HoshinoTented avatar Dec 04 '22 09:12 HoshinoTented

😨

mio-19 avatar Dec 14 '22 10:12 mio-19

A should be only compiled once by the way

mio-19 avatar Dec 14 '22 10:12 mio-19

A should be only compiled once by the way

Yes, we do have that now.

ice1000 avatar Dec 14 '22 10:12 ice1000

We should compute SCC of dependencies before compiling the library.

imkiva avatar Dec 14 '22 10:12 imkiva

We should compute SCC of dependencies before compiling the library.

The libraries won't depend on each other, so topo sorting may be enough.

HoshinoTented avatar Dec 21 '22 23:12 HoshinoTented

We should compute SCC of dependencies before compiling the library.

The libraries won't depend on each other

Are you sure? What if they declare so?

ice1000 avatar Dec 22 '22 01:12 ice1000

We should compute SCC of dependencies before compiling the library.

The libraries won't depend on each other, so topo sorting may be enough.

But this is indeed caused by library dependency. And topo sorting is surely a method that computes SCC.

imkiva avatar Dec 22 '22 05:12 imkiva

Just relax, I am taking care of this bug.

imkiva avatar Dec 22 '22 05:12 imkiva

And topo sorting is surely a method that computes SCC.

That was amazing! I got it!

HoshinoTented avatar Dec 22 '22 19:12 HoshinoTented

Looks like it's closed by #978

ice1000 avatar May 31 '24 21:05 ice1000