Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Part one of converting OFC to go modules #686

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

Waterdrips
Copy link
Contributor

Description

This will initialise a module in each function/folder. This needs to be
merged before modules can start to manage dependancies because otherwise
you get a duplicate definition error as each function that imports
anything from the ofc repo (from github in its gopkg) will pull the
whole repo in, not just the module it wants (the SDK for example) so we
need a go mod in each folder to avoid it existing twice in the
dependency tree for the function.

Once this is in, each module can be converted to go modules and remove
the use of dep

Signed-off-by: Alistair Hey alistair@heyal.co.uk

How Has This Been Tested?

I added a replace directive for the local module on disk and tested the go mod vendor and go mod tidy calls worked and started to manage deps. Without the replace we got the errors mentioned above

How are existing users impacted? What migration steps/scripts do we need?

no changes. This is background work to upgrade to go modules and is required to make the switch.

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • read the CONTRIBUTION guide
  • signed-off my commits with git commit -s
  • added unit tests

@Waterdrips
Copy link
Contributor Author

first part of #687

This will initialise a module in each function/folder. This needs to be
merged before modules can start to manage dependancies because otherwise
you get a duplicate definition error as each function that imports
anything from the ofc repo (from github in its gopkg) will pull the
whole repo in, not just the module it wants (the SDK for example) so we
need a go mod in each folder to avoid it existing twice in the
dependency tree for the function.

Once this is in, each module can be converted to go modules and remove
the use of dep

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@alexellis alexellis merged commit becb636 into openfaas:master Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants