Comments (4)
T.workspace
exists to avoid the use of os.pwd
(As it forces us the always run any Mill tooling in a process bound to that working dir and prohibits future Mill servers that can be shared for multiple projects for example). I think we should change T.workspace
to always point to the outer project directory. Although, I said that meta-builds are inaware of their outer builds, that is not completely true. It in deed depends on $
-imports of the outer builds. We can still add dependencies with import $ivy
. Also, the used Mill version is configured in the outer build. We also special configure the out
-dir to be a sub-directory of the outer out
-dir. Also @lihaoyi mentioned in a previous discussion about meta-builds, that these were not designed to be re-used by multiple projects. We can't freely use arbitrary projects as meta-builds
. Additionally, any meta-build inherit from a special MillBuildRootModule
which itself provide API with information about the outer project. All these indicate, that sharing the T.workspace
with the top-level project isn't totally wrong.
from mill.
I had kind of the same issue with ScalafmtModule
and --meta-level 1
, but I think, changing the status quo it is a twofold sword. On the one side, the meta-project is completely separate and has no information about the fact that there is a outer module. On the other side, esp. in the context of remote caching, it's problematic that some source files (e.g. the build.sc
) are outside of the workspace.
I currently think the name workspace pretty much should always refer to the whole project and we should change the current behavior. If we really need the effective mill project root, which probably relates to the source path of the root module, we should add a new accessor. Would be nice have have some more opinions on that matter. @lihaoyi maybe?
from mill.
TBH I'm not sure what the best thing to do here is. I think workspace
referring to mill-build/
is great, but as you said having files outside it is problematic. IIRC there were also BSP limitations where we couldn't have multiple modules with the same content root.
from mill.
Do we have a decision on what we should do? If I know what we want, I can try to contribute a fix.
We could also avoid setting the sourceroot
in semanticdb if it doesn't exist (it defaults to the current working directory).
from mill.
Related Issues (20)
- Stale server environment is propagated when running processes with `run`
- Project structure read incorrectly in `0.11.6` HOT 6
- None.get throw on LineNumberCorrector during migration to a meta-build HOT 4
- False warning in docs HOT 3
- Document project structure HOT 3
- Corrupted classpath for mill 0.11.6 HOT 14
- `buildTarget/cleanCache` throws an error
- Mill cache/metadata path for cross segments need to escape colons (`:`) on Windows
- IDEA seems to leak transitive dependencies via modules into classpath
- BSP: Invalid `textDocument` field in `build/publishDiagnostics` notification HOT 1
- `inspect` should show some useful info about modules
- macro build errors are reported in the generated build.sc file instead of original build.sc
- `T.input`s are evaluated twice HOT 1
- Colors in Scala 2 compile errors are not rendered
- Repro for Duplicated item inserted into OrderedSet HOT 6
- Scala 3 console doesn't work properly when `ivyDeps` includes JNA on macOS HOT 7
- Dealing with reserved file names under MS Windows HOT 1
- `--import` does not work when there is a meta-build HOT 17
- Scala 3 `build.sc` HOT 2
- `publishLocal` should be cached (`publishLocalCached`) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mill.