Skip to content

Conversation

Abscissa
Copy link
Contributor

Note that, due to #658, this only works for (pre|post)GenerateCommands, not (pre|post)BuildCommands. When #658 is fixed, this PR should automatically work for all four (pre|post)(Build|Generate)Commands.

@s-ludwig
Copy link
Member

The only solution to #618 that doesn't require larger restructurings looks like it is to insert updates to the environment vars as commands into the command array. In that case it would make sense to also insert "cd" commands there to change directories. I'm not sure if this can be considered particularly pretty, but it would mean that the command lists stay naturally composable, reducing the risk that such issues occur in other parts of the code (VisualD project generator?).

jacob-carlborg added a commit to jacob-carlborg/dmd that referenced this pull request Mar 17, 2019
When DMD is used as a Dub dependency and generates the DMD version as
a pre generate command. Dub will execute this command in the root
package working directory instead of the DMD package directory. This
will result in the wrong version, that is, it will pick up the git tag
of the root package instead of the DMD package.

This looks related: dlang/dub#659.
jacob-carlborg added a commit to jacob-carlborg/dmd that referenced this pull request Mar 17, 2019
When DMD is used as a Dub dependency and generates the DMD version as
a pre generate command. Dub will execute this command in the root
package working directory instead of the DMD package directory. This
will result in the wrong version, that is, it will pick up the git tag
of the root package instead of the DMD package.

This looks related: dlang/dub#659.
jacob-carlborg added a commit to jacob-carlborg/dmd that referenced this pull request Mar 17, 2019
When DMD is used as a Dub dependency and generates the DMD version as
a pre generate command. Dub will execute this command in the current
working directory, which usually is the root package working directory,
instead of the DMD package directory. This will result in the wrong
version, that is, it will pick up the git tag of the root package
instead of the DMD package.

This looks related: dlang/dub#659.
jacob-carlborg added a commit to jacob-carlborg/dmd that referenced this pull request Mar 17, 2019
When DMD is used as a Dub dependency and generates the DMD version as
a pre generate command. Dub will execute this command in the current
working directory, which usually is the root package working directory,
instead of the DMD package directory. This will result in the wrong
version, that is, it will pick up the git tag of the root package
instead of the DMD package.

This looks related: dlang/dub#659.
jacob-carlborg added a commit to jacob-carlborg/dmd that referenced this pull request Mar 17, 2019
When DMD is used as a Dub dependency and generates the DMD version as
a pre generate command. Dub will execute this command in the current
working directory, which usually is the root package working directory,
instead of the DMD package directory. This will result in the wrong
version, that is, it will pick up the git tag of the root package
instead of the DMD package.

This looks related: dlang/dub#659.
@Geod24
Copy link
Member

Geod24 commented Dec 18, 2019

Superseeded by #1820 (I don't have write access so someone will need to close).

@wilzbach wilzbach closed this Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants