Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn people when MOOSE submodule is out of date #34

Open
andrsd opened this issue May 24, 2016 · 6 comments
Open

Warn people when MOOSE submodule is out of date #34

andrsd opened this issue May 24, 2016 · 6 comments

Comments

@andrsd
Copy link
Contributor

andrsd commented May 24, 2016

This is what we have in RELAP-7's Makefile:

CURRENT_DIR        := $(shell pwd)
APP_DIR            ?= $(CURRENT_DIR)

# moose submodule status
moose_status := $(shell git -C $(APP_DIR) submodule status 2>/dev/null | grep moose | cut -c1)
ifneq (,$(findstring +,$(moose_status)))
  ifneq ($(origin APP_DIR),environment)
    moose_status_msg = "WARNING: Your MOOSE submodule is out of date.\n"
  endif
endif

all:: moose_submodule_status

moose_submodule_status:
    @if [ x$(moose_status_msg) != "x" ]; then echo $(moose_status_msg); fi

When people's MOOSE submodule is out of date, the first message they see is the WARNING line.

This seemed to be working for us for some time, so should we add this into stork? There might be some corner cases with this that I do not see....

@friedmud
Copy link
Contributor

I definitely like this idea... but can we make it an error instead of a warning? I'd love to do it for MOOSE / libMesh too...

@andrsd
Copy link
Contributor Author

andrsd commented May 24, 2016

We can. I have it as warning, because sometimes I run with newer MOOSE than the submodule links and in that case, it would stop the build...

@permcody
Copy link
Member

We already have a Warning for libMesh being out of date too. It's in the
build libmesh script.

On Tue, May 24, 2016 at 4:07 PM David Andrs [email protected]
wrote:

We can. I have it as warning, because sometimes I run with newer MOOSE
than the submodule links and in that case, it would stop the build...


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#34 (comment)

@andrsd
Copy link
Contributor Author

andrsd commented May 25, 2016

I was looking for the warning, but I could not find it. I know, I based my code on it, so it has to be somewhere. Also, I fixed a small problem where we were reporting module not up to date, while it was ok. The line with git status was missing the last piece cut -c1.

One more thing, why would build libmesh script report libmesh submodule not up to date? It should be reported when we execute make, right?

@permcody
Copy link
Member

David you're right. It's in moose.mk.

On Wed, May 25, 2016 at 12:23 PM David Andrs [email protected]
wrote:

I was looking for the warning, but I could not find it. I know, I based my
code on it, so it has to be somewhere. Also, I fixed a small problem where
we were reporting module not up to date, while it was ok. The line with git
status was missing the last piece cut -c1.

One more thing, why would build libmesh script report libmesh submodule
not up to date? It should be reported when we execute make, right?


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#34 (comment)

@andrsd
Copy link
Contributor Author

andrsd commented May 25, 2016

Thanks @permcody. I was grepping for "git submodule" and did not find it, becuase of that -C flag in between git and submodule ;-), I will have a small patch that improves the check. The problem we saw in RELAP was, that git submodule would report something like this:

 <sha1-hash> moose (C++03_final)

so our findstring would find the + coming from the tag, while we need to look at the first character.

rwcarlsen pushed a commit to rwcarlsen/stork that referenced this issue Feb 16, 2017
…r_circle_averages_34

return closest element info in Circle UserObjects, closes idaholab#34
rwcarlsen pushed a commit to rwcarlsen/stork that referenced this issue Feb 23, 2017
udpate error macros to use new moose functions
rwcarlsen pushed a commit to rwcarlsen/stork that referenced this issue Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants