You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that it exposes absolute path of the file. It seems to be a wrong thing to do and could be a mild security risk as it exposes the directory structure from the machine it compiles on. It also makes build less reproducible.
Should not it be changed to relative path instead?
I could try to make PR for that, but I wanted to make sure it is not an intentional behavior before investing too much time into it.
Reproduction steps
Scala version: 2.13.10
Problem
When compiled with
-Xcheckinit
flag, the code above will emit the bytecode like following:The problem is that it exposes absolute path of the file. It seems to be a wrong thing to do and could be a mild security risk as it exposes the directory structure from the machine it compiles on. It also makes build less reproducible.
Should not it be changed to relative path instead?
I could try to make PR for that, but I wanted to make sure it is not an intentional behavior before investing too much time into it.
One can find a responsible code here: https://github.com/scala/scala/blob/a360263370c1d9b4d26b943b1c55d8e4d6ed8360/src/compiler/scala/tools/nsc/transform/AccessorSynthesis.scala#L360
The text was updated successfully, but these errors were encountered: